我是這個PHP的新手,並想要一些建議,爲什麼我的計算不起作用。PHP如果功能不起作用
$income = number_format($_POST[income], 2);
$year = $_POST[year];
if ($income >= 0 && $income <= 18200){
$taxo = number_format(0,2);}
elseif ($income >= 18201 && $income <= 37000){
$taxo = number_format($income * 0.19 ,2);
}
,並在我的HTML文件某處
tax on income
$
echo $taxo;
然而,當我運行該文件,$ taxo是alwasy 0(?)。可有人請告知在那裏我聽錯了?
在此先感謝
阿爾伯特
你是什麼意思不起作用? – hichris123
如果echo在HTML中顯示,那麼您不在服務器上解析PHP。 –
你能「回聲」Hello World「;'? –