> Online tutorial : in_array() in php
Showing posts with label in_array() in php. Show all posts
Showing posts with label in_array() in php. Show all posts

in_array() in php

in_array() function searched an array for a specific value.This function returns TRUE if the value is found in the array or FALSE otherwise.
syntax
in_array(search,array,type)


<?php

$sum=array("india","pak");
if(in_array("india",$sum)
{
echo"Match Found"
}
echo"Not found";
}

?>

Output
Match Found