Answers for "php date add years"

PHP
2

adding years in php

## CURRENT DATE + ANY DATES YOU WANT TO ADD
echo date("Y-m-d", strtotime($date."+5 days"));
echo date("Y-m-d", strtotime($date."+5 weeks"));
echo date("Y-m-d", strtotime($date."+5 months"));
echo date("Y-m-d", strtotime($date."+5 years"));
Posted by: Guest on April-09-2022
-1

PHP Date add days

$date = date('Y-m-d', strtotime("+1 day"));
Posted by: Guest on June-30-2021

Browse Popular Code Answers by Language