08-17-2008, 03:31 AM
|
#4 (permalink)
|
|
The Wanderer
Join Date: Aug 2008
Posts: 11
Thanks: 4
|
Think of it like maths - everything in brackets gets evaluated first i.e.
PHP Code:
2 * 3 + 4 = 10 2 * (3 + 4) = 2 * 7 = 14
In the same way the expression in brackets gets evaluated before being compared to $list_type. Since neither 'category' or 'versions' evaluate to false, the result of ('categories' || 'versions') is true. This is what then gets compared to $list_type.
Edit:
I would read it as:
IF variable NOT EQUAL TO (string OR string)
in the same way as you, but I would see that:
(string OR string) == true
since everything in brackets gets evaluated first.
Last edited by Theo : 08-17-2008 at 04:38 AM.
Reason: Clarification
|
|
|
|