Loading…

How to get total number of elements used in array?

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

Example

                                        

$array1 = array("1","4","3");
echo count($array1);

OUTPUT : 3

Suggest An Answer

No suggestions avaliable!

Latest post from PHP Arrays

Ask Question