-
What will be the output of the following PHP code?
<?php
$Flower = array("Daffodil", "Dahlia", "Daisy", "Daphne", "Delphinium", "Dianella");
print_r(array_chunk($Flower, 3));
?>
-
-
Array
(
[0] => Array
(
[0] => Daffodil
[1] => Dahlia
[2] => Daisy
)
) -
Array
(
[1] => Array
(
[0] => Daphne
[1] => Delphinium
[2] => Dianella
)
) -
Array
(
[0] => Array
(
[0] => Daffodil
[1] => Dahlia
[2] => Daisy
)
[1] => Array
(
[0] => Daphne
[1] => Delphinium
[2] => Dianella
)
) -
Array
(
[0] => Array
(
[0] => Daffodil
[1] => Dahlia
)
[1] => Array
(
[0] => Daphne
[1] => Delphinium
)
) - None of these
-
Correct Option: C
The array_chunk() function splits an array into chunks of new arrays.