Compliments all, Am quite new in working with php but i have to try somehow... My problem is this, the formular for compound interest is A = P(1 + r/n) ^ nt Now, if i got $60000 to invest for 1 years at 15%, my interest gained would be $9000, and if i add it to my initial $60000 therefore the final amount = $69000. Here's the catch. if the year is more than 1yr like 2yrs, i want to add my initial ($60000) to the final amount ($69000) to get a new value = $129000 which i will multiply with 15% to get a new interest value = $19350 and add it to the new value ($129000) to get a new amount = $148350. and this will continue for the number of years specified.
from the example above year 1 = $60000 + $9000 = $69000 year 2 = $69000 + $60000 = $129000 ($129000*15%=$19350) now $129000+$19350 =$148350 year 3 = $148350 + $60000 = $208350 ($208350*15%=$31252.50) now $208350+$31252.50 =$239602.50 etc
i believe my explanation is plain enough. thank you.