PHP interesse |
|
Ik heb zo'n gevoel dat de onderstaande code niet helemaal php valid is:
if ($fort == "4")
{
$ans22 ="In "+ (("5"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans24 ="In "+ (("7"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans26 ="In "+ (("9"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans28 ="In "+ (("11"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans30 ="In "+ (("22"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans32 ="In "+ (("36"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans34 ="In "+ (("64"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans36 ="In "+ (("134"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans38 ="In "+ (("271"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans40 ="In "+ (("561"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans42 ="In "+ (("1175"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans44 ="In "+ (("2489"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans46 ="In "+ (("5263"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans48 ="In "+ (("11085"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans50 ="In "+ (("23328"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
$ans52 ="In "+ (("48960"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to";
}
if ($fort == "4") { $ans22 ="In "+ (("5"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans24 ="In "+ (("7"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans26 ="In "+ (("9"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans28 ="In "+ (("11"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans30 ="In "+ (("22"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans32 ="In "+ (("36"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans34 ="In "+ (("64"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans36 ="In "+ (("134"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans38 ="In "+ (("271"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans40 ="In "+ (("561"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans42 ="In "+ (("1175"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans44 ="In "+ (("2489"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans46 ="In "+ (("5263"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans48 ="In "+ (("11085"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans50 ="In "+ (("23328"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; $ans52 ="In "+ (("48960"-$_POST['dw9'])*"750000")/(((($_POST['ta']+$_POST['td']+$_POST['un']+"1")*"28"+($_POST['spy']+$_POST['sen'])*"15")*"48")*$arr[$_POST['race']][3])+" Days to"; }
ik krijg namelijk de volgende error:
Parse error: parse error, unexpected $ in /www/users/lordsofgondor.downfire.com/calculation1.php on line 897 en dat is elke keer een andere lijn en volgens mij is daar niets fout aan.
Kan iemand me helpen door te zeggen wat ik moet veranderen om dit php valid te maken??
|