• Welcome to ForumKorner!
    Join today and become a part of the community.

Next Date Help

Status
Not open for further replies.

OliverE

Power member.
Reputation
0
Hey guys,

I need a little help with some code im working on.
In the end I want some code to change the visible text when dates are past, my current code is below, but this only works for one date. I would like it to update to the next date in a calendar when the date passes.

PHP:
date_default_timezone_set('Europe/London');

$nextEvent = "2012-06-23 21:00:00";
$dateEventAfterNext = "30th June 2012";
$dateNextEvent = "23rd June 2012";

if( strtotime($nextEvent) < time() ){ // date format is YYYY-MM-DD
echo $dateEventAfterNext;
}else{   
echo $dateNextEvent;
}

Any ideas guys?

Thanks
 
Status
Not open for further replies.