title: Select list increment time by 15 minutes by 12 hour with AM/PM
body: <p>I currently have a select list which populated options like this</p>
  
  <pre><code>for($hours=0; $hours&lt;24; $hours++) // the interval for hours is '1'
  for($mins=0; $mins&lt;60; $mins+=15) // the interval for mins is '30'
      echo '&lt;option&gt;'.str_pad($hours,2,'0',STR_PAD_LEFT).':'
                     .str_pad($mins,2,'0',STR_PAD_LEFT).'&lt;/option&gt;';
  </code></pre>
  
  <p>Which currently populates</p>
  
  <pre><code>12:15
  12:30
  12:45
  13:00
  13:15
  13:30
  13:45
  14:00
  14:15
  </code></pre>
  
  <p>which does the job of incrementing by 15 minutes for a total of 24 hours but I need to change this to 12 hours with AM/PM. I am not sure how I can do this.</p>
  
  <p>So my result should look like this</p>
  
  <pre><code>11:30 AM
  11:45 AM
  12:00 PM
  12:15 PM
  12:30 PM
  12:45 PM
  01:00 PM
  01:15 PM...
  </code></pre>