Array Question

From: Date: Sat, 28 Feb 2004 23:53:00 +0000
Subject: Array Question
Groups: php.general 
Request: Send a blank email to php-general+get-179104@lists.php.net to get a copy of this message
I would like to be able to search an array for a match the a specific variable. So far, I have been trying to use preg_grep but am not getting the results that I want. Basically, I would have a variable: $url = "domain.com" I would like to search an array to see if the value of the variable $url exists in this array. The array would look like: $archives = array( "domain.com","domain2.com"); As for the results of the search, I just need a simple yes/no 1/0 response. What would be the best method of handling this? Thank You, Jason Williard

« previous php.general (#179104) next »