Zend
200-530 · Question #485
You have been given the following PHP script: 1. <?php 2. $a = 'somevalue'; 3. $array = array("a" => "One","b" => "Two", "c" => "Three"); 4. ????????????? 5. echo "\$a = $a; \$b = $b; \$c = $c"; 6…
The correct answer is B. extract($array). See the full explanation below for the reasoning.
Question
You have been given the following PHP script: 1. <?php 2. $a = 'somevalue'; 3. $array = array("a" => "One","b" => "Two", "c" => "Three"); 4. ????????????? 5. echo "\$a = $a; \$b = $b; \$c = $c"; 6. ?> What should you write at line number 4 to get the following output? $a = One; $b = Two; $c = Three
Options
- Aimplode($array);
- Bextract($array);
- Casort($array);
- Dksort($array);
How the community answered
(40 responses)- A5% (2)
- B83% (33)
- C3% (1)
- D10% (4)
Community Discussion
No community discussion yet for this question.