Posted By

sedgemonkey on 02/22/11


Tagged

php date


Versions (?)

PHP Date Switch


 / Published in: PHP
 

  1. //Show content based on the day
  2. if ($ts > mktime(0,0,0,5,7,2010)) {
  3. //5/7/2010
  4. echo "It's May 5th or later!";
  5. } else if ($ts > mktime(0,0,0,4,26,2010)) {
  6. //4/26/2010
  7. echo "It's between April 26 and May 5!";
  8. } else {
  9. echo "It's earlier than 4/26!";
  10. }

Report this snippet  

You need to login to post a comment.