php in_array

Posted by Paidboom - 2 months ago

php in_array : The in_array() function is an inbuilt function in PHP. The in_array() function checks if a specified value exists in an array.

<?php
$stu = array("Pakainfo", "Jdk", "Mayur", "Hitesh");
if (in_array("Jdk", $stu)) {
   echo "Match!";
} else {
   echo "No Match!";
}
?>