Recently I've been given an interview where many question were ask, but there was one question I could not answer which was the following:
Printing a multi dimensional array using one foreach loop only.
$cars = array (
array("Volvo",22,18),
array("BMW",15,13),
array("Saab",5,2),
array("Land Rover",17,15)
);
Interviewer asked me to print the above array using only one foreach loop. Can anybody give me answer for this?