if($today == $birthday){
$money = $money*$discount;
}else{
$money = $money*1;
}
echo $money;
可以,那样就没必要使用else了。或者下面这样:
echo ($today == $birthday)?$money*$discount:$money;