We can use the count() or size() function to get the number of elements or values in an array in PHP.

BY Best Interview Question ON 25 Jan 2019

Example

$element = array("sunday","monday","tuesday");
echo count($element );

echo sizeof($element );