RE: [PHP] search array for value
| From: | Warren Vail | Date: | Tue, 31 Jul 2001 04:56:50 +0000 |
| Subject: | RE: [PHP] search array for value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60314@lists.php.net to get a copy of this message | ||
How about;
$valuelist = explode(", ", $array);
$query = "select * from table where column in ($valuelist)";
etc.....
Warren Vail
-----Original Message-----
From: Matthew Delmarter [mailto:matt@adplusonline.com]
Sent: Monday, July 30, 2001 9:41 PM
To: PHP Mailing List
Subject: [PHP] search array for value
How do I search an array?
For example if I want to know if $array contains "1"...
Regards,
Matthew Delmarter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net