I want to add or remove a day (or more) depending on a dynamic value. Some times i want to remove / add 4 days, and next time maybe 9. How would i be able to do this in PHP? I was hoping there was i timestamp solution so i could use number of secounds.
Example: 2012-04-21 + 86400 // Add one day
Is there any good solution for this? or is there other good methods where i can use dynamic values to remove or add any number of days i wanted.
Please feel free to suggest!
Have a look at strtotime()
https://www.php.net/manual/en/function.strtotime.php