title: PHP adding AM/PM to a time string
body: <p>I'm getting a time value from a database call in the following format:</p>
  
  <pre><code>HH:MM:SS
  </code></pre>
  
  <p>Here are some examples:</p>
  
  <pre><code>08:15:00
  22:45:00
  </code></pre>
  
  <p>I need to however convert these and display them, using the above examples, as follows:</p>
  
  <pre><code>8:15 AM
  10:45 PM
  </code></pre>
  
  <p>and so on. I've been playing around with the strtotime options but everything I've tried has failed so far, and I'm not sure if that's the correct function to even use. I need go from to:</p>
  
  <pre><code>$bookingTime = "08:15:00"
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>$bookingTime = "8:15 AM"
  </code></pre>