title: Loop through range of time in half hour increments
body: <p>I want to know how to loop a time using 30-minute steps in php. I want the output to be like this:</p>
  <pre><code>&lt;select style='width:250px;' name='days' onchange='return timeSchedvalue(this.value)'&gt;
    &lt;option value='6:00-6:30 am'&gt;6:00-7:30 am&lt;/option&gt;
    &lt;option value='6:30-7:00 am'&gt;6:30-7:00 am&lt;/option&gt;
    &lt;option value='7:30-8:00 am'&gt;7:30-8:00 am&lt;/option&gt;
    &lt;option value='8:00-8:30 am'&gt;8:00-8:30 am&lt;/option&gt;
    &lt;option value='8:30-9:00 am'&gt;8:30-9:00 am&lt;/option&gt;
    &lt;option value='9:00-9:30 am'&gt;9:00-9:30 am&lt;/option&gt;
    &lt;option value='9:30-10:00 am'&gt;9:30-10:00 am&lt;/option&gt;
    &lt;option value='10:00-10:30 am'&gt;10:00-10:30 am&lt;/option&gt;
    &lt;option value='10:30-11:00 am'&gt;10:30-11:00 am&lt;/option&gt;
    &lt;option value='11:00-11:30 am'&gt;11:00-11:30 am&lt;/option&gt;
    &lt;option value='11:30-12:00 am'&gt;11:30-12:00 am&lt;/option&gt;
    &lt;option value='12:00-12:30 pm'&gt;12:00-12:30 pm&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>The loop will starts at 6:00 am - 6:30 am and it will end by 10:00 pm - 10:30 pm.</p>