Basic PHP Programming Question:
Download Job Interview Questions and Answers PDF
How can we know the count/number of elements of an array?
Answer:
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.
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.
Download PHP Interview Questions And Answers
PDF
Previous Question | Next Question |
What are the different functions in sorting an array? | How many ways we can pass the variable through the navigation between the pages? |