【发布时间】:2020-07-19 12:55:30
【问题描述】:
<?
foreach($customer as $customer_details)
{?>
<tr id="customer_details_<?=$customer_details['id']?>">
<?
foreach($dyncust_fields as $dyncust_field)
{
if($dyncust_field['add_to_listing']=='1')
{
echo "<td style='color:green;'>".$customer_details[$dyncust_field['attribute_name']]."</td>";
}
}
?>
</tr>
<? }
?>
这里我写了一些代码来显示动态列的数据,这里我想给特定列的特定数据一个颜色。但它不起作用。这里$customer_details[$dyncust_field['attribute_name']]这一行用于根据动态列获取表记录。这里$customer_details[$dyncust_field['attribute_name']] == 'cname' 我希望单元格为红色,否则显示为绿色。这个怎么做 ?。谁能帮帮我...
【问题讨论】:
-
发布您的
HTML
标签: php html css mysql codeigniter