Page 1 of 1

detecting number of values in an array

Posted: Sat Oct 29, 2005 12:52 am
by elecktricity
I would like to know if it's possible to detect the number of values in an array like so:

Code: Select all

<?PHP
$array = array('text1', 'text2', 'text3', 'text4', 'text5', 'text6');
?>
and I would get the number 6 cause there are 6 values in there

Posted: Sat Oct 29, 2005 1:01 am
by andre_c
echo count($array);