How can I convert a string, such as 02:00 to a timestamp that can be saved into the databse as an integer? It can either be mm:ss or hh:mm depending on what I want the user to input in the form. But it's always either mm:ss or hh:mm
strtotime
delivers unreliable results, so I figured it's not the right way to go. Is there another way I'm not aware of?
EDIT
To ask the question in a better way: I have a form that has an input for mm:ss and an input for hh:mm values. I need to convert these values to unix timestamps. Obviously strtotime is not the way to go for this.