Pete Winter
asked on
next month number format
I am using the below code to get next month
$nextmonth = date("m")+1;
echo $nextmonth;
So currently prints "3"
How can I make it print as 03 instead of 3 only if the result is a single number i.e. 0 to 9 not 10 to 12?
$nextmonth = date("m")+1;
echo $nextmonth;
So currently prints "3"
How can I make it print as 03 instead of 3 only if the result is a single number i.e. 0 to 9 not 10 to 12?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER