<?php $a=array("abc"=>array("red","white","orange"),"def"=>array("green","vilot","yellow"),"xyz"=>array("blue","dark","pure")); function search_data($value, $array) { foreach ($array as $key => $val) { if(is_array($val) && in_array($value,$val)) { return $key; } } return null; } echo search_data("dark",$a);
You have javascript disabled. You will not be able to edit any code.