<?php
$totalMoney = 0;//总工资
$basicMoney = 2000;//基本工资
$sex = "男";
if($sex!='女'){
$totalMoney = $basicMoney + 0;// 男的没奖金
}else if($sex=='女'){
$totalMoney = $basicMoney + 300;// 女的有奖金300元
}
echo $totalMoney;
?>
2000