Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

PHP - schedule element

0 votes
13 views
added Aug 20, 2018 in PHP by LC Marshal Captain (20,750 points)
//Once the promotion day is over, return the element to default
<?php
  $today      = date('c');
  $startdate  = date('c', mktime(0,0,0,6,14,2018)); // Example: Hour, Minute, Second, Month, Day, Year
  $enddate    = date('c', mktime(23,59,59,6,17,2018));
  if ($today >= $startdate && $today < $enddate) :
?>
  <h5 style="font-size:1.3rem">Sayangi Malaysiaku - Malaysia is ours!</h5>
<?php else :?>
  <h5>The one-stop destination for all things property - news, sale, rent, insights</h5>
<?php endif;?>  

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...