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
What are the differences between GET and POST methods?
Is nan in php?
How to add 301 redirects in PHP?
Which method do you follow to get a record from a million records? (Searching not from database, from an array in php)?
What is php full form?
What is php good for?
sort term descripttion form, report and uery
How can we check the value of a given variable is alphanumeric?
What are the advantages of stored procedures in php?
What does $_ post mean in php?
What is the use of trim function in php?
Where are php configuration settings stored?
What is the difference between substr() and strstr()?
Where session is stored?
How many columns can be added in a table in mysql?