How do I find the size of an array?
<?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.
Comment on this Question and Answer >>>
ASK A QUESTION
More arrays PHP Questions
How can I create an array of the letters of the alphabet?sort
How do you remove duplicate values from an array?
I'm shuffeling through numbers range(1, 10). Can I eval resulting random numbers and convert to appropriate text? 1 = username1, 2 = username2...etc?
How do I sort an array by key?
