Concept

How can you count the elements in a PHP array?

ComputerScienceOne / Useful Functions

"There are dozens of useful functions PHP defines that can be used with arrays. We’ll only highlight a few of the more useful ones. First, the count() function can be used to compute how many elements are stored in the array.\n\n$arr = array(10, 20, 30);\n\n$n = count($arr); //n is 3"

Related Ideas

How can you count the elements in a PHP array? | ComputerScienceOne | Bifalgorithm | Bifalgorithm