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

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -