elements in an array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bladecatcher
Forum Commoner
Posts: 67
Joined: Sat Mar 12, 2005 12:50 am

elements in an array

Post 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
AXEmonster
Forum Commoner
Posts: 34
Joined: Fri Sep 05, 2003 11:27 am
Location: newcastle UK

Post by AXEmonster »

what about array_count_values
bladecatcher
Forum Commoner
Posts: 67
Joined: Sat Mar 12, 2005 12:50 am

Post by bladecatcher »

thank you!
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

count($conditions) will do just for getting the number of elements - http://in.php.net/manual/en/function.count.php
Post Reply