How can I use php to calculate how long it will take to pay off a credit card debt using a minimum payment option.
Here are the variables:
Credit Card Balance: $ccb
Minimum Payment percentage of balance: $mmp
Number of months to pay off: $mos
Amount Paid: $amt
Credit cards offer a minimum payment option, typically 3% of the balance due. If you make only the minimum payment and your balance is say $20000 how long will it take to pay off the entire balance and how much money will have been spent to pay off the balance?
I need the formula to be written in PHP.