title: PHP date() Hours, Minutes and Seconds without leading zeros
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3172332/convert-seconds-to-hourminutesecond">Convert seconds to Hour:Minute:Second</a>  </p>
  </blockquote>
  
  
  
  <p>I've been searching all over the internet to find a good way of converting seconds into minutes:seconds without leading zeros. I already checked out <a href="https://stackoverflow.com/questions/4639047/php-date-minutes-without-leading-zeros">this question</a>, which is the only one I was even able to find, however none of those answers look very good. Perhaps they are the only and best way to achieve this, however I would hope not. </p>
  
  <p>I have done this and it gives me the number of minutes without the leading zeros, however I am unable to get the seconds. The only way I can think of doing it this way would be to do a few lines of math and such, but that seems like an awful lot of work for something as simple as this... which I don't know why PHP doesn't have it built in for minutes and seconds anyways....</p>
  
  <pre><code>intval(gmdate("i:s", $duration));
  </code></pre>
  
  <p><strong>Edit</strong>
  All I am trying to do is to convert the number of seconds in a video, into a H:M:S format.</p>