Financing Calculator

'120 mo. Financing', "operator" => '*', "multiplier" => '.0149'), array ( "name" => '60 mo. Rent-to-Own', "operator" => '/', "multiplier" => '26'), ); function plans(){ global $options; $selecthtml = ""; foreach ($options as $key => $value){ $selecthtml .= " ". $options[$key]['name'] ."
\n"; }//foreach return $selecthtml; }// plans function function getpayment(){ global $options; if ($_GET['price']){ $price = $_GET['price']; $paymenthtml .= ""; foreach ($options as $key => $value){ $operator = $options[$key]['operator']; $multiplier = $options[$key]['multiplier']; if ($operator == "*"){$monthlyprice = ($price * $multiplier);} if ($operator == "/"){$monthlyprice = ($price / $multiplier);} $paymenthtml .= "\n"; }//foreach $paymenthtml .= "
" . $options[$key]['name'] . " $" . number_format($monthlyprice, 2) . "
"; return $paymenthtml; }//if get }//getpayment function if ($_GET['pagetype']=="ajax"){echo getpayment();} if (!$_GET['pagetype']=="ajax"){ echo "
\n
Rent to Own / Finance Calculator
" . getpayment() . "
"; }//if ?>