Zend
200-710 · Question #191
What will be the output of the following code? ``php $a = array(0, 1, 2 => array(3, 4)); $a[] = array(4, 5); echo count ($a, 1); ``
The correct answer is C. 8. See the full explanation below for the reasoning.
Arrays
Question
What will be the output of the following code?
$a = array(0, 1, 2 => array(3, 4));
$a[] = array(4, 5);
echo count ($a, 1);
Options
- A4
- B5
- C8
- DNone of the above
How the community answered
(63 responses)- A5% (3)
- B6% (4)
- C73% (46)
- D16% (10)
Topics
#count()#COUNT_RECURSIVE#nested arrays#multidimensional arrays
Community Discussion
No community discussion yet for this question.