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";
?>
What's your reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0





