A newbie to php but trying learn.
I thought it might be best to learn by trying to create small simple programs but I am getting the following error:
Parse error: syntax error, unexpected T_STRING in /home/jctest/www/www/mytest/mortgage.php on line 8
the code where the error seems to be is as follows:
<?php
// Set up variables
$month = 1;
$balance = 60834.09;
$payment = 573.81;
//Calculate interest
function calcInterest() { <-----------[B] This is Line 8[/B]
$interest = ($balance x 6) / 100;
$balance = $balance + $interest;
echo $balance;
}
//Deduct Bi-weekly payment
Function calculate(){
$balance = $balance - $payment;
}
// Do calculation
calculate();
echo $balance . "<br>";
calcInterest();
echo $balance . "<br>";
?>
Any help appreciated.
Thanks