Letter Letter - 9 months ago 41
PHP Question

Php date add 1 year to current date

I have this php code right here:


I use it in order to get current date, i need to add 5 years to the current date, something like:

$end=date('(Y + 5)-m-d');

Someone help me how to achieve it?

hsz hsz

Try with:

$end = date('Y-m-d', strtotime('+5 years'));