我想根据特定值更改整个单元格的颜色。但是当语法错误并且不起作用时该怎么办呢?在我的代码中 echo "<tr if( $row['treatment_fees_check_division'] == 'error') : style='yellow' >"; echo "<td>" . $row['id'] . "</td>"; echo "<td>" . $row['chart_num'] . "</td>"; echo "<td>" . $row['chart_name'] . "</td>"; echo "<td>" . substr($row['visit'], 0,10) . "</td>"; echo "<td >" . number_format($row['total_medical_bills']) . "</td>"; echo "<td >" . number_format($row['total_amount']) . "</td>"; echo "<td>" . number_format($row['amount_asked']) . "</td>"; echo "<td>" . number_format($row['medical_bills_payment']) . "</td>"; echo "<td>" . number_format($row['personal_liability_amount']) . "</td>"; echo "<td >" . number_format($row['non_payment']) . "</td>"; echo "<td >" . number_format($row['non_payment_sales']) . "</td>"; echo "<td>" . $row['insurance_division'] . "</td>"; echo "<td>" . $row['division'] . "</td>"; echo "<td>" . number_format($row['cash_amount_received']) . "</td>"; echo "<td>" . number_format($row['cash_receipt']) . "</td>"; echo "<td>" . number_format($row['cash_receipt_non_payment']) . "</td>"; echo "<td>" . number_format($row['cash_receipt_payment']) . "</td>"; echo "<td>" . number_format($row['card_amount_received']) . "</td>"; echo "<td>" . number_format($row['card_non_payment']) . "</td>"; echo "<td>" . number_format($row['card_payment']) . "</td>"; echo "<td>" . number_format($row['treatment_fees_difference']) . "</td>"; echo "<td>" . $row['treatment_fees_check_division'] . "</td>"; echo "</tr>";
1 回答
www说
TA贡献1775条经验 获得超8个赞
尝试用这样的内容替换你的第一行。
if ($row['treatment_fees_check_division'] == 'error') {
echo "<tr style='yellow' >";
} else {
echo "<tr >";
}
- 1 回答
- 0 关注
- 88 浏览
添加回答
举报
0/150
提交
取消