count is a function of arrays in PHP that returns the number of elements in a given array.
The count method of an array can be returned like so.
1 2 3 4 5 6 7 8 9 10 11 |
<?php $arr=[ "apple", "banana", "orange", "kiwi" ]; echo count($arr); |
Output:
1 2 3 |
4 |