1.

What will be the output of the following PHP code ?
  <?php $array = array("red", "green"); array_push($array, "blue", "yellow"); print_r($array); ?>  

A. Array ( [0] =&gt; red [1] =&gt; green [2] =&gt; blue [3] =&gt; yellow )
B. Array ( [0] =&gt; blue [1] =&gt; yellow [2] =&gt; red [3] =&gt; green )
C. Array ( [0] =&gt; red [1] =&gt; green )
D. Array ( [0] =&gt; blue [1] =&gt; yellow )
Answer» B. Array ( [0] =&gt; blue [1] =&gt; yellow [2] =&gt; red [3] =&gt; green )


Discussion

No Comment Found