1.

What will be the output of the following PHP code ?
  <?php $a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow"); $result = array_flip($a1); print_r($result); ?>  

A. Array ( [red] =&gt; red [green] =&gt; green [blue] =&gt; blue [yellow] =&gt; yellow )
B. Array ( [a] =&gt; a [b] =&gt; b [c] =&gt; c [d] =&gt; d )
C. Array ( [red] =&gt; a [green] =&gt; b [blue] =&gt; c [yellow] =&gt; d )
D. Array ( [a] =&gt; red [b] =&gt; green [c] =&gt; blue [d] =&gt; yellow )
Answer» D. Array ( [a] =&gt; red [b] =&gt; green [c] =&gt; blue [d] =&gt; yellow )


Discussion

No Comment Found