Tutorial PHP Array Contains

Check if value is in array and outputs Yes or No $names = array( 'Bob', 'Jim', 'Mark' ); echo 'In Array? '; ...

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';
?>

Hot in Week

Popular

Archive

item