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”));

Posted on
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/category.php on line 383
Categories Uncategorized

Deprecated: Creation of dynamic property WP_Query::$comments_by_type is deprecated in /home/testadnan/adnan.pk/innovator/wp-includes/comment-template.php on line 1528

9 thoughts on “Date Addition and Subtraction in PHP”

  1. 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?

    tq

  2. 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

Your email address will not be published.