I have been trying to parse results and make sure when I am doing so that I don't repeat the same data. I tried to use a few different options built into php with no luck. I did find an example of a recursive array search taht seems to work but its very intesive and adds a lot of time to the script. What I'm needing: Does anyone know a better way to handle this without changing the array that I supply to it so something built in like in_array or array_search?ARRAY EXAMPLE: array (size=3)  0 =>     array (size=3)      'author' => string 'Jim Beam' (length=8)      'id' => string '1' (length=1)      'md5' => string 'f2ebf4d4f333c31ef1491a377edf2cc4' (length=32)  1 =>     array (size=3)      'author' => string 'Jack Daniels' (length=12)      'id' => string '2' (length=1)      'md5' => string 'd1839707c130497bfd569c77f97ccac7' (length=32)  2 =>     array (size=3)      'author' => string 'Jose Cuervo' (length=11)      'id' => string '3' (length=1)      'md5' => string '64e989b4330cc03dea7fdf6bfe10dda1' (length=32)CODE EXAMPLE: function recursive_array_search($needle,$haystack) {    foreach($haystack as $key=>$value) {        $current_key=$key;        if($needle===$value OR (is_array($value) && recursive_array_search($needle,$value) !== false)) {            return $current_key;        }    }    return false;}$agentArray = array(    array('author'=>'Jim Beam','id'=>'1','md5'=>'f2ebf4d4f333c31ef1491a377edf2cc4'),    array('author'=>'Jack Daniels','id'=>'2','md5'=>'d1839707c130497bfd569c77f97ccac7'),    array('author'=>'Jose Cuervo','id'=>'3','md5'=>'64e989b4330cc03dea7fdf6bfe10dda1'));$fakeMD5 = '84d7dc19766c446f5e4084e8fce87f82'; //StackOverflow MD5$realMD5 = 'd1839707c130497bfd569c77f97ccac7'; //Jack Daniels MD5echo '<b>In_Array:</b> <br/>';$faketest = in_array($fakeMD5,$agentArray);$realtest = in_array($realMD5,$agentArray);var_dump($faketest,$realtest);echo '<b>Search_Array:</b> <br/>';$faketest2 = array_search($fakeMD5,$agentArray);$realtest2 = array_search($realMD5,$agentArray);var_dump($faketest2,$realtest2);echo '<b>Custom Recursive Array Seach Function:</b> <br/>';$faketest3 = recursive_array_search($fakeMD5,$agentArray);$realtest3 = recursive_array_search($realMD5,$agentArray);var_dump($faketest3,$realtest3);RESULTS:In_Array:Fake: boolean falseReal: boolean falseSearch_Array:Fake: boolean falseReal: boolean falseCustom Recursive Array Seach Function:Fake: boolean falseReal: int 1
Searching multidimensional arrays
php;array