How can we know the count/number of elements of an array?
Answer Posted / 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 View All Answers
Where is session id stored?
Describe which programming language does php parallel to?
Which is better php or wordpress?
How to open a file for writing?
What is a lambda function in php?
Can we extend two classes in php?
What is use of echo in php?
What is session data?
How to repeat a string to a specific number of times in php?
What are properties in php?
Do you know how can php and html interact?
What are the difference between overloading and overriding in oops?
Tell me what is the actually used php version?
What are the advantages of indexes in php?
What is the difference between $var and $$var?