Re: Suggestion for "IN()"
| From: | Robert Cummings | Date: | Thu, 30 Sep 2004 20:19:54 +0000 |
| Subject: | Re: Suggestion for "IN()" | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198340@lists.php.net to get a copy of this message | ||
On Thu, 2004-09-30 at 15:50, Cosmin wrote:
> you could try in_array()
>
> if (in_array(1,2,3,4,5), 6)
Just for farts and giggles... possibly better speed with such a basic
datatype:
if( strpos( ' 1 2 3 4 5 6 7 ', " $a " ) !== false )
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'