Mega Code Archive
Categories
/
Php
/
Class
Counting the elements in an array
'Cylinder', 'N' => 'Rectangle', 'A' => 'Sphere', 'O' => 'Sphere', 'P' => 'Rectangle'); $numElements = count($shapes); print "The array has $numElements elements.
"; ?>