note 10010 added to in_array
| From: | ts at cape dot com | Date: | Wed, 06 Dec 2000 19:50:45 +0000 |
| Subject: | note 10010 added to in_array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8486@lists.php.net to get a copy of this message | ||
In PHP3, this seems to work pretty well:
if (ereg("@@myThing@@", "@@" . join("@@", $myArray) . "@@")
{
// "myThing" is in $myArray
}
http://www.php.net/manual/function.in-array.php