Discussion board
How do I find the size of an array?
By Arun Desai
How do I find the size of an array?????
Reply
Post   Reset
Teacher SiliconIndia replied to Arun Desai Wednesday, March 17, 2010
Hi Arun,
<?php
$values = range("A","Z");
echo count($values);
?>
This will print "26" to the screen.
Alternatively you can use sizeof($arrayname) instead - it will return the same result.