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

Example

                                        

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

echo sizeof($element );

Suggest An Answer

No suggestions Available!