[EMAIL PROTECTED] (Craig) wrote:

 > How can i display a dynamic page showing last month and next month and the
 > month before
>
 > eg
 > this moth is <?php echo date("j-M-Y H:i"); ?>
 > how do i add 1 to the month or -1 to the month?

last month:
date("j-M-Y H:i", mktime(0,0,0,date("m")-1, date("d"), date("Y")));

next month:
date("j-M-Y H:i", mktime(0,0,0,date("m")+1, date("d"), date("Y")));

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to