Zend
200-530 · Question #497
You run the following script: <php $array1 = array ("a", "b", "c", "d", "e", "f"); $array2 = array_slice($array1, 2, 2); foreach ( $array2 as $val ) { print "$val"; } ?> What will be the output?
The correct answer is B. c d. See the full explanation below for the reasoning.
Question
You run the following script: <php $array1 = array ("a", "b", "c", "d", "e", "f"); $array2 = array_slice($array1, 2, 2); foreach ( $array2 as $val ) { print "$val"; } ?> What will be the output?
Options
- Aa b
- Bc d
- Cb c
- Dd e
How the community answered
(18 responses)- A6% (1)
- B83% (15)
- D11% (2)
Community Discussion
No community discussion yet for this question.