How to convert hour-min-sec to seconds in PHP

When you have data given in “00:07:31″, you can use a calculator to figure it’s 451 seconds in total. It’s not really sure if there’s a better way to do in PHP but I did it this way:

[code lang=”php”][/code]

The Unix timestamp begins from January 1, 1970. It is elapse time in second from January 1, 1970. For “00:07:31”, the elapse time has been 451 seconds. Do share if you have other methods that I could’ve missed.