How to Get Array Length in PHP
To get array length in PHP, we make use of Count function. Sample code is given below.
1 2 3 4 5 6 7 |
<?php $array = array("Robert", "Rony", "Peter", "Sam"); echo count($array); ?> |
To get array length in PHP, we make use of Count function. Sample code is given below.
1 2 3 4 5 6 7 |
<?php $array = array("Robert", "Rony", "Peter", "Sam"); echo count($array); ?> |