PHP convert datetime to seconds
datetime, mysql, php
Solution
huh ? these function are from `mysql` ...
For PHP, you replace it using `strtotime`
$diff = strtotime('2010-12-08 16:12:12')-time();
details : http://php.net/manual/en/function.strtotime.php
Problem
I have a datetime value in `mysql` '2010-12-08 16:12:12' that I'd like to get the seconds to that date using `PHP`, so basically a `PHP` equivalent of `mysql` : ``` TIME_TO_SEC(TIMEDIFF('2010-12-08 16:12:12',now())) ```