Jump to content

[SOLVED] Dynamically create List value entries.


oceans

Recommended Posts

Sorry, I'm not sure I follow your last post. I'll just show you an example using an array and a foreach loop.

 

<?php

  $vals = array('foo','boo','bar');
  echo "<select name=\"Combo1\" id=\"Combo1\">";
  foreach ($vals as $v) {
    echo "  <option value=\"$v\">$v</option>";
  }
  echo "</select>";

?>

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.