I’d like to have a php function which will deduct a value, say, 50 from an initial integer of say, 500 at a set interval.
For example: Every 30 days, deduct 50 from 500. So after 90 days, you are left with 350, etc.
I can do subtractions, it’s the interval routine that I can’t figure out.
If not PHP, JS is great too. This is used to count down a value from the beginning of the year, to the end.
You have a starting number, and you trying to figure out what your current value is. Its a basic total – (time pass * decrement) problem.
So example, You have your original time.