I found this really useful to use in the phpflare_contactus.php. The snip is a copy and paste from the php manual: https://www.php.net/manual/en/function. ... .php#91365
Code: Select all
By buddel
the recursive function by tony have a small bug. it failes when a key is 0
here is the corrected version of this helpful function:
<?php
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;
}
?>