?
What will be the output of the following PHP code?
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));
?>
<?php
$cars = array("Volvo", "BMW", "Toyota", "Honda", "Mercedes", "Opel");
print_r(array_chunk($cars, 2));
?>
Answer & Solution
Correct Answer:
Option
D
The array_chunk() function splits an array into chunks of new arrays.
Join the Discussion
Login to post a comment or share your explanation.
Login