Possible Duplicate:
Convert seconds to Hour:Minute:Second
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 this question, 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.
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....
intval(gmdate("i:s", $duration));
Edit All I am trying to do is to convert the number of seconds in a video, into a H:M:S format.