1.

What will be the output of the following PHP code?
 <?php $fruits = array ("mango", "apple", "peach", "pear"); $fruits = asort ($fruits); printr ($fruits); ?>  

A. Array ( [1] =&gt; apple [0] =&gt; mango [2] =&gt; peach [3] =&gt; pear )
B. Array ( [0] =&gt; apple [1] =&gt; mango [2] =&gt; peach [3] =&gt; pear )
C. Error
D. Array ( [1] =&gt; apple [0] =&gt; mango [3] =&gt; peach [2] =&gt; pear )
Answer» B. Array ( [0] =&gt; apple [1] =&gt; mango [2] =&gt; peach [3] =&gt; pear )


Discussion

No Comment Found