quick PHP question

2003-08-30 Thread Trevor Smith
I'm trying to do some mathematics using a time value in PHP. It's dead simple in MySQL: mysql> select date, duration, miles, sec_to_time(time_to_sec(duration) / miles) as speed from runs where shoes=6 order by date; ++--+---+--+ | date | duration | miles | spe

Re: quick PHP question

2003-08-30 Thread Greg Donald
> Unfortunately I want my darn PHP web page to do this calculation and > spit it out with my other run data but I can not find any useful PHP > function similar to MySQL's sec_to_time() or time_to_sec(). Nor can I > make mktime() do anything useful here. You probably want strtotime(), it can do t