trying to figure the following out :
I have a club that runs 3 days a week, Tuesday, Thursday and Saturday.
I want to print out the next club date from this week, so if Tuesday is the next meeting print out "Tuesday" or if today is Tuesday, print "Today", same for Thursday and Saturday.
I have the following code :
<?php
$current = date('l', strtotime('now'));
$tuesday = date('l', strtotime('tuesday this week'));
$thursday = date('l', strtotime('thursday this week'));
$saturday = date('l', strtotime('saturday this week'));
if ($tuesday < $current) {
echo "Tuesday in the future";
} else if ($thursday < $current) {
echo "Thursday in the future";
} else if ($saturday < $current) {
echo "Saturday in the future";
}
?>
And this is where i fell short and couldn't figure it out....as it always just prints "Tuesday in the future".
Any help, suggestions or explanations would be grealy welcome!
Thanks E