Skip to content
Advertisement

PHP -> Next nearest date defined by array of days in week

please, really need help with this problem.

I have array of offerDays – $offerDays = array(1,6); (mean Monday, and Saturday);

For example, input date is Wednesday 2014/09/03. Next available date for offers is Saturday 2014/09/06

Question: How I can in php determine nearest next day? Something like

JavaScript

Advertisement

Answer

Here you can have a variable array for the offerdays.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement