Answers for "php arry length"

PHP
3

php array lenght

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

calculate array length in php

<?php
  //use count($var) ->
$a[0] = 1;
$a[1] = 3;
$a[2] = 5;
var_dump(count($a));
Posted by: Guest on March-31-2021

Browse Popular Code Answers by Language