find string

From: Date: Sun, 10 Aug 2003 23:15:00 +0000
Subject: find string
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-159072@lists.php.net to get a copy of this message
Here's the problem I have: I have $action which can be anyone of a1, a2, a3, a4. I tried if ($action!='a1' || $action!='a3') //tried == also { //do stuff } else { //do other stuff } Problem is that if() only seems to take one option so my construct above doesn't work. What function can I use to do something like: if ($action is among the items of 'a2,a4') kind of construct? I tried strpos('a1a2a3',$action) but with the same results. TIA -- Regards, Andu Novac

« previous php.general (#159072) next »