1.

What will be the output of the following PHP code?
 <?php $cars = array("Volvo", "BMW", "Toyota", "Honda", "Mercedes", "Opel"); print_r(array_chunk($cars, 2)); ?>  

A. Array ( [0] =&gt; Array ( [1] =&gt; Volvo [2] =&gt; BMW ) [1] =&gt; Array ( [1] =&gt; Toyota [2] =&gt; Honda ) [2] =&gt; Array ( [1] =&gt; Mercedes [2] =&gt; Opel ) )
B. Array ( [1] =&gt; Array ( [1] =&gt; Volvo [2] =&gt; BMW ) [2] =&gt; Array ( [1] =&gt; Toyota [2] =&gt; Honda ) [3] =&gt; Array ( [1] =&gt; Mercedes [2] =&gt; Opel ) )
C. Array ( [0] =&gt; Array ( [0] =&gt; Volvo [1] =&gt; Volvo ) [1] =&gt; Array ( [0] =&gt; BMW [1] =&gt; BMW ) [2] =&gt; Array ( [0] =&gt; Toyota [1] =&gt; Toyota ) )
D. Array ( [0] =&gt; Array ( [0] =&gt; Volvo [1] =&gt; BMW ) [1] =&gt; Array ( [0] =&gt; Toyota [1] =&gt; Honda ) [2] =&gt; Array ( [0] =&gt; Mercedes [1] =&gt; Opel ) )
Answer» E.


Discussion

No Comment Found