/ Published in: PHP
Functions to search from arrays as well as recursive arrays.
Expand |
Embed | Plain Text
// search from array function array_query($array,$what){ } return false; } // search from recursive arrays function recursiveArraySearch($haystack, $needle, $index = null) { $aIt = new RecursiveArrayIterator($haystack); $it = new RecursiveIteratorIterator($aIt); while($it->valid()) { return $aIt->key(); } $it->next(); } return false; }
You need to login to post a comment.
