Woodburn2006 Posted September 14, 2006 Share Posted September 14, 2006 if i have a variable with a number of days e.g. 20. is there any way of adding that number to a date so that we get a new date.for example if i start with 2006/04/20 i would add 20 to it and end up with 2006/05/10.is there any way of doing this? Quote Link to comment Share on other sites More sharing options...
Barand Posted September 14, 2006 Share Posted September 14, 2006 [code]<?php$date = '2006/04/20';$addDays = 20echo date ('Y/m/d', strtotime ("$date + $addDays days"));?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.