In_array() function return Boolean type data and this function mostly used for check value in array exist or not such as-

<?php

$array=array(“mango”,”apple”,”orange”);

if(in_array(“apple”,$array)){
echo ‘exist’;
}else{
echo ‘not exist’;
}

?>

News Reporter
IT Software and web development, Core PHP, JavaScript, JQuery, HTML, CSS, CakePHP, Angularjs, Codeigniter etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: