Zend
200-530 · Question #530
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
- Ad e
- Bc d
- Ca b
- Db c
How the community answered
(28 responses)- A11% (3)
- B82% (23)
- C4% (1)
- D4% (1)
Community Discussion
No community discussion yet for this question.