Tutorial PHP Array Contains
Check if value is in array and outputs Yes or No
<?php
$names = array( 'Bob', 'Jim', 'Mark' );
echo 'In Array? ';
if (in_array(‘foo’, $names))
echo 'Yes';
else
echo 'No';
?>
Check if value is in array and outputs Yes or No
<?php
$names = array( 'Bob', 'Jim', 'Mark' );
echo 'In Array? ';
if (in_array(‘foo’, $names))
echo 'Yes';
else
echo 'No';
?>