Date: 08/31/01
- Next message: Seb Frost: "RE: [PHP] PHP Security"
- Previous message: Papp Gyozo: "Re: [PHP] Databases, arrays and woes"
- Next in thread: Andrey Hristov: "Re: [PHP] array search"
- Reply: Andrey Hristov: "Re: [PHP] array search"
- Reply: Papp Gyozo: "Re: [PHP] array search"
- Maybe reply: Alfredeen, Johan: "RE: [PHP] array search"
- Maybe reply: Joseph Bannon: "RE: [PHP] array search"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have an array of names, like below...
$people = array("Jim","John","JP");
Is there a way in an IF statement to see if someone's name is in the array?
Like...
if ($people =~ $person) { }
I don't want to have to create a foreach loop to go through the array to see
if that person is there.
Joseph
-- 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>
- Next message: Seb Frost: "RE: [PHP] PHP Security"
- Previous message: Papp Gyozo: "Re: [PHP] Databases, arrays and woes"
- Next in thread: Andrey Hristov: "Re: [PHP] array search"
- Reply: Andrey Hristov: "Re: [PHP] array search"
- Reply: Papp Gyozo: "Re: [PHP] array search"
- Maybe reply: Alfredeen, Johan: "RE: [PHP] array search"
- Maybe reply: Joseph Bannon: "RE: [PHP] array search"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

