PHP如果需要其他帮助

时间:2014-03-25 16:01:41

标签: php if-statement

我一直在疯狂,我已经阅读并尝试了我能找到的一切,我希望有人能够帮助我完成..

if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount'] = $reportData['profit'] = + $reportData['profit']);

else $reportData['profit'] = - $reportData['profit'];

if应该是,如果退款金额大于产品成本,它应该=

目前我们只看到其他

非常感谢您提前 谢谢 罗素

3 个答案:

答案 0 :(得分:0)

这可以帮助你

if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount'])
       $reportData['profit'] =+ $reportData['profit'];
 else 
    $reportData['profit'] =- $reportData['profit'];

答案 1 :(得分:0)

这就是你的意思我相信......

if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount']){
    $reportData['profit'] =+ $reportData['profit'];
}else{ 
    $reportData['profit'] =- $reportData['profit'];
}

答案 2 :(得分:0)

我很快就看了,但你应该看看W3 tutorial on if, else, elseif

if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount']){ 
$reportData['profit'] =+ $reportData['profit'];
}

else { 
$reportData['profit'] =- $reportData['profit'];
}