December 20, 2015 How to Get Array Length in PHP By Krishnaa PHP Questions 0 Comments To get array length in PHP, we make use of Count function. Sample code is given below. <?php $array = array("Robert", "Rony", "Peter", "Sam"); echo count($array); ?> 1234567 <?php $array = array("Robert", "Rony", "Peter", "Sam"); echo count($array); ?> You May Also Like: Arrays