Answers for "lengh array php"

PHP
30

php length of array

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

get array length using php

// using count() we can get proper length of the array
$names = array("Ankur","Raj","Ram","Suresh");
// pass array into count() as parameter it will return array length
echo count($names);

// output : 4
Posted by: Guest on June-03-2020
3

php array lenght

<?php
$cars=array("Volvo","BMW","Toyota");
echo count($cars);
?>
Posted by: Guest on July-28-2020

Browse Popular Code Answers by Language