Jump to content

[SOLVED] next/previous months


aebstract

Recommended Posts

Okay, I was working with someone and had solved the topic lalal and would rather not bring it back up. I realized it won't really do anything by year and it won't add/remove a month from other months other than the current one found by date();. I need to be able to manually put in a month and year and be able to find the next month and previous month.

 

$previous = date("F Y",strtotime('-1 month'));
$next = date("F Y",strtotime('+1 month'));

Link to comment
https://forums.phpfreaks.com/topic/139839-solved-nextprevious-months/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.