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 you remove duplicate values from an array?How do I change: function wordlimit($string, $length = 50, $ellipsis = "...") { $words = explode(' ', strip_tags($string)); if (count($words) > $length) return implode(' ', array_slice($words, 0, $length)) . $ellipsis; else
when i fetch the record in the database but they skip first record in the database
How can I sort a multi-dimensional array?
How do I reverse sort the members of an array?
