The title of this article should be count(), but due to technical restrictions, cannot contain parenthesis.

Counts the number of elements in an array or the number of properties in an object.

Arguments Edit

{{{returns}}} count (mixed var [, int mode])

Argument Inclusion Edit

(PHP 3, PHP 4, PHP 5)

Examples Edit

Example 1: Edit

 array $fruits (apple, orange, pear, peach);
 $result = count ($fruits);
 print $result;

Output Edit

For more details on this function, visit its entry in the php manual.