Loading…

How to get a total number of elements used in the array?

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 avaliable!

Latest post from PHP interview questions

Ask Question