Jump to content

Nested While Loop not working


loganbest

Recommended Posts

foreach ($dropDowns as $name => $v) {
  echo "<select name='{$name}'>";
  foreach ($v as $opHTMLValue => $optValue) { 
    echo "<option value='{$optHTMLValue}'>{$optValue}</option>";
  }
  echo "</select>";
}

 

this will expect an array structured like this..

array(
  [places] => array(
    [myroom] => My Betroom!,
    [bathroom] => The Bathroom!
  ),
  [names] => array(
    [names1] => Tanya,
    [names2] => Jane
  )
)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.