How to get next Friday’s date

Asked

Viewed 94 times

0

I would like to inform you what day falls every Friday coming, how do I do? Then when you arrive next Friday you inform the other Friday and so on.

1 answer

0


The function strtotime allows generating dates from strings like "next Friday" (in English):

echo date('Y-m-d', strtotime('next Friday'));

See working.

  • kkkkk I am 2 days trying to do this with various code reach to put every day of the week and months in variables to try to solve but when I changed the date to test in February that is until 28 or 29 went wrong! Here comes a blessed like you and resolves with just a line of code kkkkkkk thank you very much friend solved!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.