Q. Which of the following is the correct way to get the number of elements in an array?
β
Correct Answer: (B)
count($array)
Explanation: count() returns the number of elements in an array. sizeof() also works as an alias.