I don't know what to put in search bar since I have no idea what to call it so, my bad if I have duplicate topic.
I seriously don't know how to put this but, I'll give an example.
Let's say, there's an event on January 20, 2013 09:30:00. Today's date is January 11, 2013 15:25:00.
I want to echo something a day before the event on January 20, 2013. (24 Hours before the Event)
It's like on January 19, 2013 I will receive or echo something that should remind me that tomorrow is the event takes place.
Well I have this code that I'm working on but still, it feels so wrong.
$start_ts = strtotime("2013-01-10 20:15:00"); //
$now_ts = strtotime("now");
$result_ts = $start_ts - $now_ts;
$reminder = ( 60 * 24 ) * 60; // 24 hours period
if ($result_ts <= $reminder) {
echo "Today's a date before the event day";
} else {
echo "Event is already finished";
}
The output is:
It should echo "Event is already finished"
To be honest, I'm losing my track here. Hope you guys help me, would be glad though.