I use in_array() to check whether a value exists in an array like below,
in_array()
$a = array(\"Mac\", \"NT\", \"Irix\", \"Linux\"); if (in_array(\"Irix\"
It works too creating first a new unidimensional Array from the original one.
$arr = array("key1"=>"value1","key2"=>"value2","key3"=>"value3"); foreach ($arr as $row) $vector[] = $row['key1']; in_array($needle,$vector);