PHP如果需要其他帮助
我已经疯了,我读了所有我能找到的东西,我希望有人能帮我完成PHP如果需要其他帮助,php,if-statement,Php,If Statement,我已经疯了,我读了所有我能找到的东西,我希望有人能帮我完成 if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount'] = $reportData['profit'] = + $reportData['profit']); else $reportData['profit'] = - $reportData['profit']; 如果应该,如果退款金额大于产品成本,则应= 目前我们
if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount'] = $reportData['profit'] = + $reportData['profit']);
else $reportData['profit'] = - $reportData['profit'];
如果应该,如果退款金额大于产品成本,则应=
目前我们只看到其他的
事先非常感谢
谢谢
罗素这对你有帮助吗
if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount'])
$reportData['profit'] =+ $reportData['profit'];
else
$reportData['profit'] =- $reportData['profit'];
这就是你想做的我相信
if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount']){
$reportData['profit'] =+ $reportData['profit'];
}else{
$reportData['profit'] =- $reportData['profit'];
}
我只是很快地看了看,但你应该退房
这是unicornphp。你最好阅读一些关于PHP如何工作的教程。我认为你不明白
if
和else
是什么意思。。。=+
到底是什么意思?阅读和[&&]
或[||或[|||]
条件中的语句这并不是他想要的+=
与=+
不同,在['profit'之后还有一个)
这将导致错误发生……最好先链接到//的php手册,然后再链接。
if ($reportData['refund_amount_ex'] > $reportData['returned_products_cost_amount']){
$reportData['profit'] =+ $reportData['profit'];
}
else {
$reportData['profit'] =- $reportData['profit'];
}