Tutorial PHP Array Contains
Check if value is in array and outputs Yes or No $names = array( 'Bob', 'Jim', 'Mark' ); echo 'In Array? '; ...
https://iskablogs.blogspot.com/2014/03/tutorial-php-array-contains.html
Check if value is in array and outputs Yes or No
$names = array( 'Bob', 'Jim', 'Mark' );
echo 'In Array? ';
if (in_array(‘foo’, $names))
echo 'Yes';
else
echo 'No';
?>
$names = array( 'Bob', 'Jim', 'Mark' );
echo 'In Array? ';
if (in_array(‘foo’, $names))
echo 'Yes';
else
echo 'No';
?>