Something that will crop up at some point in your programming lifespan is a little bit of compound interest.
Well its very easy to work it out. The below example does so over a 7 day period at 1.8% interest per day.
$amount = $amount + round($amount*$rate);
$compound = compound(1000000,7,0.018);