Display content on your site up to a certain date with PHP.

The following bit of code is handy if you need to display events on your site up to a certain date etc, or any other date related material.

<?php
$message = <<<EOF
// this can be any html content - with complete syntax such as <div class="something"></div>
EOF;

if(mktime(0,0,0,8,19,2018) > strtotime('now')) { // the content will expire on August, 19th 2018 at midnight (change it to your needs)

Like us on Facebook below to reveal the rest of the content.

Leave a Reply

Your email address will not be published. Required fields are marked *