/ Published in: PHP
Search recursively some value in array with the key name
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static function recursive_array_key_search($needle, $key, $haystack) { $recursive_array_key_search = false; $recursive_array_key_search = true; } else { foreach( $haystack as $key1 => $val ) { if(self::recursive_array_key_search($needle, $key, $val)) { $recursive_array_key_search = true; break; } } } } return $recursive_array_key_search; }