I need to add +1 to a value every week at Thursday for example..
Let’s assume the value is 5.
Its the 1st of the month and its Thursday.
I want 5 to change to 6 by the 8th of the month.
How do I do that?
I started to come up with something, but since I’ve never really learned PHP properly I didn’t really know what I was doing.
$value = 5;
$num = $value + 1;
BUT, then the $value stays the same and the $num won’t change.
Thanks!
Easiest would be to store an initial date and a starting value. “On July 14th, the value is 5”:
This will dynamically caculate how many weeks have elapsed since the intial date, and add it to the initial value, giving you your new value.