Created
November 19, 2015 09:59
-
-
Save oliwa/cf947109e88c1e59e992 to your computer and use it in GitHub Desktop.
Conditional with a date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$currentdate = date('Y-m-d'); | |
$mydate = '2015-02-08'; | |
if($currentdate >= $mydate) { | |
?> | |
<h1>later than mydate</h1> | |
<?php } else { ?> | |
<h1>earlier than mydate</h1> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment