function sizeof() returns the number of elements contained in an array. : sizeof « Data Structure « PHP






function sizeof() returns the number of elements contained in an array.

 
Its syntax is: int sizeof (array array)

<?
    $s = array ("Washington", "New York", "Oregon", "California");
    for ($i = 0; $i < sizeof ($s); $i++) :
         print "$s[$i]";
    endfor;
?>
  
  








Related examples in the same category