Let’s say I want to get a have a database that contains days of the week. For example one record in database can contain a “Thursday”. I want to be able to run my script anytime and determine what year, month and day will the next Thursday be each time I run my script. How can I do that?
Share
You can use
strtotime()for this:Sample in action: http://codepad.org/NRm3xoJB