Q. Which PHP function is used to count all elements in an array, including nested arrays?

  • (A) sizeof()
  • (B) array_count()
  • (C) count($array, COUNT_RECURSIVE)
  • (D) deepcount()
πŸ’¬ Discuss
βœ… Correct Answer: (C) count($array, COUNT_RECURSIVE)
Explanation: count() with COUNT_RECURSIVE counts all elements, including elements in nested arrays.
Explanation by: Rati Dubey
count() with COUNT_RECURSIVE counts all elements, including elements in nested arrays.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
73
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
99%
Success Rate