Jump to content

date("d")+1 misses trailing '0'


luminous

Recommended Posts

I'm setting a date using:

 

$day = date("d")+1;

 

However when I echo this result I get a single character rather than two i.e '7' and not '07', anyone know what could be up with this? I'm sure it's something to do with the '+1' because i create the current date with this code and returns with the format I want.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/215282-dated1-misses-trailing-0/
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.