title: php calculate late fees every 30 days
body: <p>ok, I am trying to figure out how to add 1.5% to a total number from my DB every 30 days. If my balance today is $600 and I have not paid it in 30 days, it adds 1.5%, but if I dont pay it in 60 days, it adds 1.5% on top of the first 30 days late fee. Here is what I have...</p>
  
  <p>if ($invoicedate &lt;= "$30_date"){ $late = (1.5 / 100) * $total; }</p>
  
  <p>so I pull the date the invoice was created, check to see if it is 30 days or more and if so, calculates the correct "new" total as $late. How would I do this for every 30 days no matter how long? Do I really have to define $60_date, $90_date, etc?</p>