array size php
snippet in php

php array length

user5730

count($myArray);

php length of array

user2034

<?php
	$arr = ["one", "two", "three", "four"];
	echo count($arr);
  ?>

php array lenght

user4098

<?php
$cars=array("Volvo","BMW","Toyota");
echo count($cars);
?>

get array length using php

user9952

// 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

count array php

user3312

$cars=array("Volvo","BMW","Toyota");
echo count($cars);
//returns 3

array size php

user925


 sizeof(array, mode)