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

Can you please give an example?

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.