This is a discussion on Re: [PHP] find string within the PHP General forums, part of the PHP Programming Forums category; Hello, This is a reply to an e-mail that you wrote on Mon, 11 Aug 2003 at 00:25, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
This is a reply to an e-mail that you wrote on Mon, 11 Aug 2003 at 00:25, lines prefixed by '>' were originally written by you. > Isn't there an in_array function you can use? > If (in_array($action, array(a1,a2,a3,a4)) { > // do something > else { > // do something else > Carl. Make sure that your string values are in quotes or PHP will belooking for constants with those names, i.e. array('a1','a2','a3','a4') David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Free PHP error handling script: www.phpmachine.com/error-handler/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ |