RE: [PHP] array search From: Joseph Bannon (JBannon <email protected>)
Date: 08/31/01

What about going the other way? Say I have a sentence...

"Hi, my name is Bob."

...and I want to search the sentence for one of the values (people) in the
array...

$people = array("Jim","John","JP","Bob");

Can this be done?

Thanks,
Joseph

-----Original Message-----

yes, in_array($person, $people)!

however, you may take a look into the manual.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>