Hi

I was wondering if someone can help me put this array format into drop down menus:

Values: ["radiobutton","dropdown1","value1"]
Values: ["radiobutton","dropdown2","value1","value2","value3"]
Values: ["radiobutton","dropdown3","value1","value2","value3","value4"]
Values: ["radiobutton","dropdown4","value1","value2","value3"]

This array is saved into $values...

These values are returned dynamically from a database when "radiobutton" is selected. "dropdown1" is the drop drop menu name the values (in this case "value1") needs to go into.

How can I iterate through the array and depending on the second value populate the drop down menu?
so "dropdown2" will have values "value1", "value2" and "value3" in its drop down menu
dropdown3 will have values "value1", "value2", "value3" and "value4" in its drop down menu etc...


I only know how to simply put one array which is hardcoded in to a drop down and not depending (in this case) the second value in the array...

Hope someone can help me?