PHP get 31 days distance from starting date -


how can date after 31 days starting $startdate, $startdate string of format: yyyymmdd.

thank you.

strtotime give unix timestamp:

$date = '20101007'; $newdate = strtotime($date.' + 31 days'); 

you can use date format same format, if that's need:

echo date('ymd', $newdate); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -