Answers for "how to check the length of elements in an array in php"

PHP
30

php length of array

<?php
	$arr = ["one", "two", "three", "four"];
	echo count($arr);
  ?>
Posted by: Guest on December-29-2019
1

php array length

<?php 
  $names = array("Ankur","Raj","Ram","Suresh");
  echo count($names);
 $cars=array("Volvo","BMW","Toyota");
 echo count($cars);
// test
Posted by: Guest on March-12-2021

Code answers related to "how to check the length of elements in an array in php"

Browse Popular Code Answers by Language