Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

count array index foreach in php


<?php
$a[0] = 1;
$a[1] = 3;
$a[2] = 5;
var_dump(count($a));

$b[0]  = 7;
$b[5]  = 9;
$b[10] = 11;
var_dump(count($b));
?>

Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #count #array #index #foreach #php
ADD COMMENT
Topic
Name
8+5 =