Zend
200-530 · Question #398
Consider the following PHP script: <?php $a = array( 1 => 'php', 'Hypertext', 'Preprocessor', 'widely used' => array( 'general' => 'purpose', 'scripting' => 'language', 'that' => 'was', 'originally'…
The correct answer is C. print $a['widely used']['originally'][10]. See the full explanation below for the reasoning.
Question
Consider the following PHP script: <?php $a = array( 1 => 'php', 'Hypertext', 'Preprocessor', 'widely used' => array( 'general' => 'purpose', 'scripting' => 'language', 'that' => 'was', 'originally' => array( 5 => 'designed', 9 => 'for', 'Web development', 4 => 'purpose',))); //write code here ?> What should you write here to print the value 'Web development'?
Options
- Aprint $a[2][3][3];
- Bprint $a['widely used']['originally'][0];
- Cprint $a['widely used']['originally'][10];
- Dprint $a[widely used][originally][3];
How the community answered
(45 responses)- A16% (7)
- B4% (2)
- C71% (32)
- D9% (4)
Community Discussion
No community discussion yet for this question.