How We Can Get The Number Of Elements In An Array?

Count Array items in PHP

The count() function is used to return the number of elements in an array.

$array = [1,2,3,4,5,"text"]; 
echo count($array); // result 6 

You may also like...

1 Response

Leave a Reply

Your email address will not be published. Required fields are marked *

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

codeforbetter will use the information you provide on this form to be in touch with you and to provide updates and marketing.