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 Uncategorized9 Comments on Date Addition and Subtraction in PHP