oliwa
11/19/2015 - 9:59 AM

Conditional with a date

Conditional with a date

<?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 } ?>