I am not a programmer, sometimes it difficult to get some thing done. So, I have some work for PHP, I try to make a PHP code for getting the display date not today but the past such as 6 day. It quite hard for me. Any suggestion! Thankshttp://forums.digitalpoint.com/images/icons/icon11.gif
This would be the function you want to look into if what I'm thinking is the same as what you are trying to explain: php.net/mktime
This would be simple <?php $days_before = 6; // Number of days before today $current_date = date('Y-m-d'); $str = strtotime($current_date)-(86400*$days_before); //1 day has 86400 echo date('Y-m-d',$str); // Output : 2009-06-12 echo "<br>"; // Line break echo date("F j, Y",$str); // Output : June 12, 2009 ?> Code (markup):