Re: [PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)

2008-08-24 Thread Greg Bowser
if (stripos(strrev($file), "gpj.") === 0) || (stripos(strrev($file), "fig.") === 0) || (stripos(strrev($file), "gnp.") === 0) { You have too many parenthesis: if (stripos(strrev($file), "gpj.") === 0) <-- this ends the if statement; the next || is unexpected. Also, at the end, you're missing a

Re: [PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)

2008-08-24 Thread Govinda
I had been to that page, tried this: if (stripos(strrev($file), "gpj.") === 0) || (stripos(strrev($file), "fig.") === 0) || (stripos(strrev($file), "gnp.") === 0) { (yes, Jochem, the regExp solution is best, but I am practicing things ;-) and got Parse error: syntax error, unexpected T_BOO

Re: [PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)

2008-08-24 Thread Chris
Govinda wrote: I swear I am RTFM, but it's an art in itself (at first anyway)/ WHERE is the syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3) { ? I got *AND* to work with "&", but "|" does not seem to work for *OR* Actually & is a bitwise operator in php, not what you want. You wan