Result Size: 625 x 571
x
 
<!DOCTYPE html>
<html>
<body>
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland", 23);
if (in_array("23", $people, TRUE))
  {
  echo "Match found<br>";
  }
else
  {
  echo "Match not found<br>";
  } 
if (in_array("Glenn",$people, TRUE))
  {
  echo "Match found<br>";
  }
else
  {
  echo "Match not found<br>";
  }
if (in_array(23,$people, TRUE))
  {
  echo "Match found<br>";
  }
else
  {
  echo "Match not found<br>";
  }
?>
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_func_in_array2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:50:53 GMT -->
</html>
×

Report a Problem: