Bifalgorithm post · Computer science one · Useful Functions
How can you count the elements in a PHP array?
How can you count the elements in a PHP array? (Computer science one · Useful Functions) — "There are dozens of useful functions PHP defines that can be used w…
Ideas in this flowchart
- PHP provides useful functions for working with arrays.
- PHP defines dozens of useful array functions.
- Only a few of the more useful functions are highlighted.
- The count() function computes how many elements are stored in an array.
- $arr = array(10, 20, 30);
- $n = count($arr);
- The variable $n is 3.