Page 1 of 1

elements in an array

Posted: Sat Mar 19, 2005 2:14 am
by bladecatcher
G'day All,
How do I find the number of elements in an arraY

$conditions = explode(" ", $readline);
$elements = numberofelements($conditions)

is there a 'numberofelements' function in php?

tia
bladecatcher

Posted: Sat Mar 19, 2005 2:18 am
by AXEmonster
what about array_count_values

Posted: Sat Mar 19, 2005 2:52 am
by bladecatcher
thank you!

Posted: Sat Mar 19, 2005 4:20 am
by anjanesh
count($conditions) will do just for getting the number of elements - http://in.php.net/manual/en/function.count.php