in_array: Checks if a value exists in an array : Array Function : Data Structure PHP Source Code


PHP Source Code » Data Structure » Array Function »

 

in_array: Checks if a value exists in an array




<?php
   $grades = array(100,94.7,67,89,100);
   if (in_array("100",$grades)) 
      echo "Somebody studied for the test!";
   
   if (in_array("100",$grades,1)) 
      echo "Somebody studied for the test!";
?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Data Structure
» Array Function