title: How do you convert between 12 hour time and 24 hour time in PHP?
body: <p>I have a time as a string, for example:</p>
  
  <pre><code>$time = '5:36 pm';
  </code></pre>
  
  <p>I require this to be in 24 hour format (i.e. <code>17:36</code>), however I don't know which functions I need to use to convert it. Please help.</p>