php foreach loop with multidimensional array

php foreach loop with multidimensional array

A multidimensional array is an array containing one or more arrays , you can user for loop and foreach loop to get all values of two-dimensional arrays

Hot to define two-dimensional arrays

$bus= array
(
array(“TATA”,33,12),
array(“Valvo”,12,16),
array(“scania”,11,23),
array(“Rover”,11,11)
);

above two-dimensional array contains four arrays

How we print all values of array

Leave a Reply

Your email address will not be published. Required fields are marked *