Finding the size of an array : const « Class « PHP






Finding the size of an array

 
<?
$dinner = array('A','B','C');

$dishes = count($dinner);

print "There are $dishes things for dinner.";
?>
  
  








Related examples in the same category

1.Constant definition is considered a static member of the class
2.Counting the elements in an array
3.Using Class Constants
4.Using Class Constants in PHP5