Hello all. Can anyone show me the best way to convert a duration consisting of only minutes and seconds (such as 2:15) into all seconds (which would be 135 based on my original 2:15). Thanks in advance!
You could explode the string using the ":" as the delimiter. This will give you an array with two entries. Take the first entry, multiply it by 60 then add the result to the second entry and you're done.