I want to add number of days to current date:
I am using following code:
echo $date = strtotime(date("Y-m-d", strtotime($date)) . " +".$i."days");
This should be
echo date('Y-m-d', strtotime("+30 days"));
expects to be given a string containing a US English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC), relative to the timestamp given in now, or the current time if now is not supplied.
Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given.
See the manual pages for
and their function signatures.