Answers for "array get size php"

PHP
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
0

array size php

<?php

 $cars=array("Volvo","BMW","Toyota");
echo sizeof($cars);
?>
Posted by: Guest on September-22-2021

Browse Popular Code Answers by Language