Search for the value "Glenn" in an array and output some text:
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");

if (in_array("Glenn", $people))
  {
  echo "Match found";
  }
else
  {
  echo "Match not found";
  }
?>
by გიორგი ბაკაშვილი
4 years ago
PHP
Array
PHP official doc
0
Pro tip: use ```triple backticks around text``` to write in code fences