Zend
200-530 · Question #18
You run the following PHP script: <?php $array1 = array ("a", "b", "c", "d", "e", "f"); $array2 = array_slice($array1, -3); foreach ( $array2 as $val ) { print "$val "; } ?> What will be the output?
The correct answer is B. d e f. See the full explanation below for the reasoning.
Question
You run the following PHP script: <?php $array1 = array ("a", "b", "c", "d", "e", "f"); $array2 = array_slice($array1, -3); foreach ( $array2 as $val ) { print "$val "; } ?> What will be the output?
Exhibit
Options
- Ab c d
- Bd e f
- Cc d e
- Da b c
How the community answered
(42 responses)- A7% (3)
- B81% (34)
- C2% (1)
- D10% (4)
Community Discussion
No community discussion yet for this question.
