Re: [PHP] Need help on increment date

2012-05-24 Thread Md Ashickur Rahman Noor
It works. Thanks you two. Thanks Shiplu bro for the advice. -- Dedicated Linux Forum in Bangladesh 2048R/89C932E1 Volunteer, FOSS Bangladesh && Mozilla Reps

Re: [PHP] Need help on increment date

2012-05-24 Thread shiplu
It works for me too. I tell you two things, a) make sure there is a space after +1 day. So it should look like "+1 day ". This ensures that the unix time is not concatenated with "day". b) calling strtotime 2 times is not a great solution. You can all it once only. Like this, $date = strtoti

Re: [PHP] Need help on increment date

2012-05-24 Thread Md Ashickur Rahman Noor
Get this from here -- Dedicated Linux Forum in Bangladesh 2048R/89C932E1 Volunteer, FOSS Bangladesh

Re: [PHP] Need help on increment date

2012-05-24 Thread Stuart Dallas
On 24 May 2012, at 08:18, Md Ashickur Rahman Noor wrote: > I need help to increment date in php. I found this code helpful > > $date = strtotime("+1 day", strtotime("2007-02-28")); > > echo date("Y-m-d", $date); > > > But when My date is "2008-02-28" this code give output 2012-03-01. But it >

[PHP] Need help on increment date

2012-05-24 Thread Md Ashickur Rahman Noor
HI all I need help to increment date in php. I found this code helpful $date = strtotime("+1 day", strtotime("2007-02-28")); > > echo date("Y-m-d", $date); > > But when My date is "2008-02-28" this code give output 2012-03-01. But it should be 2008-02-29. Where I am getting wrong.