Hi,
I know it is possible but I am having difficulties trying to find help online for Multidimensional Arrays populating multiple drop-down menus.
I have 3 dropdown menus. The first has a list of car makes. The other two are for car model and car year. I would like to have the car make populate based on the car make selection and have the car year populate based on the car model selection. I do not want to use a database as the webhost has restirctions.
Here is a short snippet and the array looks something like this:
[php]$arr = array(
array(
“Make” => “Honda”,
“Model” => “Accord III Aerodeck”,
“Year” => 1988),
array(
“Make” => “Honda”,
“Model” => “Accord III Aerodeck”,
“Year” => 1989),
array(
“Make” => “Honda”,
“Model” => “Accord IV Aerodeck”,
“Year” => 1992),
array(
“Make” => “Honda”,
“Model” => “Accord IV Sedan”,
“Year” => 1991),
array(
“Make” => “Honda”,
“Model” => “Accord IX Sedan”,
“Year” => 2016)
);[/php]
Can anyone help with setting up a loop to pull out Model based on Make and Year based on Model.
Thanks for any advice.