Skip to content

Instantly share code, notes, and snippets.

@MarkyC
Last active December 11, 2015 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MarkyC/4562207 to your computer and use it in GitHub Desktop.
Save MarkyC/4562207 to your computer and use it in GitHub Desktop.
<div class="input-prepend">
<span class="add-on">Day: </span
<select name="day" id="day" class="input-block-level">
<?php
// create array to populate <option>'s
$dow = array(
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
);
foreach ($dow as $num => $day) {
echo "<option value=\"" . ($num+1) . "\" ";
if (($num+1) == $col) echo "selected";
echo ">" . $day . "</option>";
}
?>
</select>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment