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 do I find if a value is already in an array or not?How can I display a 2 dimensonal array?
when i fetch the record in the database but they skip first record in the database
I have an array of a hundred or so lines, each line has data with "|" separated values. I need to scan through this array, and select the line whose first 5 characters matches a text string. Any ideas or questions?
How can I mix up the order of values in an array?
