strtotime Add Two Working Days

David Carr

Tutorials PHP & MySQL

There are times you want to add days to a date but only working days, so weekends are ignored.

Thankfully strtotime makes this super easy simply use weekdays like this:

date('Y-m-d H:i:s', strtotime('+2 weekdays'))

 

Copyright © 2006 - 2024 DC Blog - All rights reserved.