Search array index on regex???
| From: | Shawn McKenzie | Date: | Thu, 24 Apr 2003 02:13:58 +0000 |
| Subject: | Search array index on regex??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145109@lists.php.net to get a copy of this message | ||
Example:
I need to see if one of the indices in the array is contained within
$_SERVER['QUERY_STRING'] and if so, return the array. Any help???
I'm thinking maybe an array function that uses a callbak? What would be
quicker than looping through the array?
Example:
$thearray = array (
'cat=5&action=add' =>
array (
'thing1' => 'onefish',
'thing2' => 'twofish',
)
'cat=5&action=del' =>
array (
'thing1' => 'redfish',
'thing2' => 'bluefish',
)
);
Thanks!
Shawn