December 20, 2015 HomePHP QuestionsHow to Get Array Length in PHP 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); ?> You May Also Like: How to Add Key & Value in Array in PHP Arrays in PHP Associative Arrays in PHP How to Find Middle Element in Array in Javascript How to Append One Array to Another Array in Javascript