Output the number of days until 4th of July


SUBMITTED BY: henry1874w

DATE: June 17, 2017, 1:30 p.m.

FORMAT: Text only

SIZE: 179 Bytes

HITS: 234

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $d1=strtotime("July 04");
  6. $d2=ceil(($d1-time())/60/60/24);
  7. echo "There are " . $d2 ." days until 4th of July.";
  8. ?>
  9. </body>
  10. </html>

comments powered by Disqus