Re: find string

From: Date: Mon, 11 Aug 2003 00:00:57 +0000
Subject: Re: find string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159077@lists.php.net to get a copy of this message
what exactly is action ? i usually use a action setup like follows ?action=update switch ($_GET['action']) { case 'update': //do stuff here break; case 'insert': //do stuff here break; } very clean > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#159077) next »