array-length tagged requests and articles

Categorized request examples and articles tagged with [array-length] keyword
How to get the length of an array in PHP?
To get the array's length in PHP, you can use the count() and sizeof() functions that return the number of items in the array. Function sizeof() is the alias of the count() function. The count() function returns 0 for a variable initialized by an empty array. In this PHP Array Length example, we obtain the array's length using the count() function. Click Execute to run the PHP Array Length Example online and see the result.