PHP find elements in an array

How can I find elements in an array using php.Here is a simple small example to find element an array.Youcan use php in_array() function to this.

 'user_id', 1 => 'user_name', 2 => 'user_email');
$result = in_array('user_id',$myArray);
if($result)
	echo "Exist";
else
	echo "Doesn't Exist";
?>