Date Addition and Subtraction in PHP

Hi guys
today i started my blog , i hope i will share lots of good experiences with you .
i start with a very handy approach that i learned today in php , adding or subtracting dates .

Date Addition and Subtraction

here is the code

echo date(‘Y-m-d’, strtotime(“+28 days”));
echo date(‘Y-m-d’, strtotime(“-28 days”));
echo date(‘Y-m-d’, strtotime(“+2 months”));
echo date(‘Y-m-d’, strtotime(“+2 years”));


assalamualaikum bro,

thanx for the code on data addition n subtraction in php.. it really helps me

anyway regarding your comment on my site, what do you mean by you can’t partition your hard disk to install XP? Perhaps you can just use partition manager such as Partition Magic?


wa alikum us slam !

i m using windows manager for partition , there is a 116 GB unallocated . when i make it volume then it shows me how much space . i give the space but at the end it shows me ,
i dont have enough space .. but there is alot of space ..and i gave less than 116GB .. but not ..

partition magic 7 . i used . but not working on vista DAM .

Leave a Reply