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



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

Answer / rajan vardawaj

2 ways:
a) sizeof($array) - This function is an alias of count()
b) 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.

Is This Answer Correct ?    17 Yes 0 No

Post New Answer

More PHP Interview Questions

What is the difference between InnoDb tables and MyIsam Tables in php

1 Answers  


Why does sql injection happen?

0 Answers  


What does PEAR stands for?

0 Answers   Arigo Infotech,


Are php variables global?

0 Answers  


What is the function in PHP do not return a timestamp?

0 Answers  






Which function is used to read a single character from a file in PHP.

0 Answers  


Tell me how to get the value of current session id?

0 Answers  


What is self in php?

0 Answers  


Why these language is needed?

3 Answers  


What is meant by urlencode and urldecode?

0 Answers  


Why would we use === instead of ==?

0 Answers  


Is it more secure to use cookies to trfer session ids?

0 Answers  


Categories