Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

count an array in php

<?php
 $vegetables = ["Cabbage", "Carrot", "Lettuce"];
 $arrayLength = count($vegetables);
 echo $arrayLength; //returns 3
?>
 
PREVIOUS NEXT
Tagged: #count #array #php
ADD COMMENT
Topic
Name
8+9 =