What is the easiest way to conver MYSQL Datetime into PHP UNIXTIME?
Example:
data from mysql is 2012-12-31 23:59:59 then it converted into UNIXTIME.
$dateTime = '2012-12-31 23:59:59'; // convert this to unixtime stamp
$unixTime = strtotime($dateTime); // this not work as expected
I have tried strtotime, but it not work correctly.
You could do: