SHARE
TWEET

Untitled

a guest Jun 19th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function findArrayWithKeyValue($array, $search_key, $search_value)
  2. {    
  3.     foreach($array as $key=>$value)
  4.     {
  5.         if(is_array($value))
  6.             return findArrayWithKeyValue($value, $search_key, $search_value);
  7.  
  8.         if($key == $search_key &&
  9.            $value == $search_value)
  10.             return $array;
  11.     }
  12. }
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top