0

how to get 12 hour time from time datatype in mysql and php?
can anyone help me???

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Persi
0

Can you please give an example?

<tr><th>TIME</th><td>
<select name="hr">
<?
  for($i=1;$i<=12;$i++)
  {
      echo "<option>$i</option>";
  }
?>
</select>
<select name="min">
<?
  for($i=0;$i<=45;$i=$i+15)
  {
      if($i==0)
      {
          echo "<option>00</option>";
      }
      else
      {
          echo "<option>$i</option>";
      }
    }
?>
</select>
<select name="am">
<option>AM</option>
<option>PM</option>
</select>
</td></tr>

I need to join all these three values into a single variable. Is there a way?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.