Web Analytics

PHP count() Function

Array FunctionPHP 4+

The count() function counts all elements in an array or properties in an object.

Syntax

count(Countable|array $value, int $mode = COUNT_NORMAL): int

Try It Online

Output
Click Run to execute your code