2
私は車の金融電卓を構築しようとしています、私は毎月原則の支払いを表示することで、コードを改善したいと思いますし、各ヶ月の関心は、私が何を行うには、次のコード車両財務計算PHP
$interest = 10 /100/12;//10 is the interest rate
$months = 60; //60 months term
$loan = 12000;// total loan amount
$monthly_payment = $loan * $interest/(1-(pow((1+$interest),-$months)));
$total_payable = $monthly_payment * $months;
$total_interest = ($total_payable - $loan);
echo "Monthly Payment = " . $monthly_payment. '<br>';
echo "Total Payable = " . $total_payable . '<br>';
echo "Total Interest = " . $total_interest . '<br>';
echo "Monthly Interest = " . ($total_interest/$months) . '<br>';
を持っています私は、これは式
$ 100 $ 100 = 10%/ 12ヶ月* $、12,000)である http://www.ifsautoloans.com/car-loan-interest/
このページで数式を使用する必要がありますたいです。その結果、最初の支払いで、あなたは$ 154.96 [ - $ 154.96 $ 100 = $ 254.96]で、あなたの元本を返済します。
私はちょうど私がやりたいことは、このリンクと同じである任意のヘルプ
をありがとう、それを理解していない私はあなたの迅速なPHP
を与えている
http://www.thecalculatorsite.com/finance/calculators/carloancalculator.php
はどうもありがとうございました私はほぼありましたが、あなたの道は再びはるかに優れて感謝です – tuckbloor