提交结果正常,但是右边不显示结果
<?php
$totalMoney = 0;//总工资
$basicMoney = 2000;//基本工资
$sex = "男";
if($sex==男){
$totalMoney = $basicMoney + 0;// 男的没奖金
}else if($sex=="女"){
$totalMoney = $basicMoney + 300;// 女的有奖金300元
}
echo $totalMoney;
?>
显示结果:
Notice: Use of undefined constant 男 - assumed '男' in /957/8o36/index.php on line 6
2000