the $exp variable is in this format comming from the database 2003-08-20 01:08:06 or Y-m-d hⓂs (mysql DATETIME)
now i need to get make $exp into a timestamp in order to break it down, how can i do so?
// Get Time left
$exp = $row['exp'];
// Need to make $exp into timestamp in order to break it down
// Get the number of seconds NB time() - $otstamp to give +ve difference):
$seconds = abs(time() - $otstamp);
$days = (int)($seconds / (60 * 60 * 24));
$r = (int)($seconds % (60 * 60 * 24));
$hours = (int)($r / (60 * 60));
$r = (int)($r % (60 * 60));
$minutes = (int)($r / 60);
$timeleft = $days . "d " . $hours . "h " . $minutes . "m ";
I appreciate all ur help!! Thanks