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

PHP - HTML in PHP echo

0 votes
16 views
added Feb 1 in PHP by LC Marshal Captain (22,750 points)
<?php
  $display   = false;
  // $tzget     = date_default_timezone_get();
  $today     = date('c');
  $startdate  = date('c', mktime(0,0,0,1,31,2019)); // Example: Hour, Minute, Second, Month, Day, Year
  $enddate    = date('c', mktime(23,59,59,2,19,2019));
  // $enddate    = date('c', mktime(15,41,59,8,23,2018));
  if ($today >= $startdate && $today < $enddate)
    $display = true;
  if ($display):
    // Event: Change as you wish
    echo '<h4 class="m-t-0 text-center" style="color: rgba(0, 0, 0, 0.6);">Season\'s Greetings</h4>';
    echo '<h5 class="text-center" style="font-size:1.3rem; color: rgba(0, 0, 0, 0.6);">We wishes you Merry Christmas & a Happy New Year!</h5>';
  else:
    // Default Hero Text
    echo '<h3 class="m-t-0">Malaysia 4x4 &amp; Offroad</h3>';
  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.
...