I\'ve a function that returns url of 1 month before.
I\'d like to display current selected month, but I cannot use simple current month, cause when user clicks link
You can simple use the strtotime
function on whatever input you have to arrive at April 2012 then apply the date
and strtotime
with an increment period of '+1 month'.
$x = strtotime($t);
$n = date("M Y",strtotime("+1 month",$x));
echo $n;
Here are the relevant sections from the PHP Handbook:
http://www.php.net/manual/en/function.date.php
https://secure.php.net/manual/en/function.strtotime.php
This solution solves the additional issue of incrementing any amount of time to a time value.