[PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)
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* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)
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 want http://www.php.net/manual/en/language.operators.logical.php -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)
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_BOOLEAN_OR in... You want http://www.php.net/manual/en/language.operators.logical.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WHERE is syntax doc'ed for saying: if (expr1 *OR* expr2 *AND* expr3)
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 parentheses at the end: (stripos(strrev($file), gnp.) === 0) should be(stripos(strrev($file), gnp.) === 0)) -- GREG