To find the number of elements in a PHP $array, which is faster/better/stronger?
count($array) or sizeof($array) ?
Please use count function, Here is a example how to count array in a element
$cars = array("Volvo","BMW","Toyota");
echo count($cars);
The count() function returns the number of elements in an array.
The sizeof() function returns the number of elements in an array.
The sizeof() function is an alias of the count() function.