Letter Letter - 5 months ago 15x
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'));