![](http://www.studyzone4u.com/assets/image/ads6.jpg)
How can we find or count number of elements in an array?
Last updated 5 years, 10 months ago | 1542 views 75 5
![Card image](/static/app-assets/images/sz4u-cover.jpg)
PHP | Count number of elements in an array
There are two ways to find the number of elements in an array:
1. sizeof($arr), This function is an alias of count()
echo sizeof($arr);
2. count($arr)
echo count($arr);