Skip to content

count ​

php
number count(array $tablica , [number $tryb])

Counts the elements in $tablica. If the optional $tryb argument is 1, elements in nested arrays are counted recursively.

Example:

php
$tablica = array(0, 3, 6, 9, 'a', '');
print(count($tablica));

Result:

6