searching within all keys in a multidimensional array PHP -


i want search keys within multidimensional array specific string. need work out if present, nothing more. want know if ip of visitor present within of arrays.

is there php function or method can use this, each 1 i've tried returns false. (in_array, array_search, array_filter)

i hoping avoid looping through each key , set of values.

example array

array (     [21] => array         (             [click_id] => 21             [ip_addr] => 109.148.183.1             [dtime] => 2011-04-28 17:56:57             [url_id] => 11         )      [22] => array         (             [click_id] => 22             [ip_addr] => 109.148.183.1             [dtime] => 2011-04-28 17:57:05             [url_id] => 12         )      [23] => array         (             [click_id] => 23             [ip_addr] => 109.148.183.1             [dtime] => 2011-04-28 18:42:42             [url_id] => 10         ) ) 

thanks

can never avoid loop :-)

function search($array, $searchstring){    foreach($array $key=>$val){         if(in_array($searchstring, $val)) return true;    }    return false; }  //use so: if(search($array, '109.148.183.1')){/*do something*/} 

Comments