Your Ad Here
0

How can we know the count/number of elements of an array?

Posted by The Blogger on 12:30 PM in
Answer 1:
sizeof($array) – This function is an alias of count()

Answer 2:
count($urarray) – This function returns the number of elements in an array.


Interestingly if you just pass a simple var instead of an array, count() will return 1.


tags: php interview questions and answers, php interview question How can we know the count/number of elements of an array, How can we know the count/number of elements of an array, number of elements of an array

0 Comments

Post a Comment

Your Ad Here

Copyright © 2009 Interview Questions and Answers