Hello,
I have the following code which happily adds 3 months to a date. The issue I have is that if the day number is less than 10 it doesn't pad the new date with a zero.
For example.... 2011-03-03 (old date) 2011-06-3 (new date).
How can I add a zero to preceed the day number if less than 10 with the existing code that I am using?
I would really appreciate any help
Regards
Rowan
$date=$expiry;
$newdate = strtotime ( '+3 month' , strtotime ( $date ) ) ;
$newdate = date ( 'Y-m-j' , $newdate );