【发布时间】:2018-04-12 18:51:56
【问题描述】:
我需要有关此代码的帮助..
这是表:
<table id="tabela_zaduzi_plombe" class="table-responsive table table-striped table-bordered table-hover dataTable no-footer font-size-13">
<thead>
<tr class="boja-reda">
<th class="width-50"></th>
<th class="align-center width-50"><input type="checkbox" id="checkAll" /></th>
<th class="width-300"><?php echo __("SERIJSKI BROJ"); ?></th>
</tr>
</thead>
<tbody>
<?php //debug($lista_slobodnih_plombi); die; ?>
<?php foreach($lista_slobodnih_plombi as $lista_sp): ?>
<?php foreach($lista_sp as $lista): ?>
<tr>
<td></td>
<td class="align-center td_checkbox"><input type="checkbox" name="link-cbx" class="checkItem" autocomplete="on" id="<?php echo $lista;?>" data-sb_plombe="<?php echo $lista;?>"/></td>
<td class="sbr"><?php echo $lista;?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</table>
这是数组的输出:
array(
(int) 0 => array(
(int) 0 => '222222222',
(int) 1 => '222222223',
(int) 2 => '222222224',
(int) 3 => '222222225'
),
(int) 1 => array(
(int) 0 => '333333333',
(int) 1 => '333333334'
),
(int) 2 => array(
(int) 0 => '444444444',
(int) 1 => '444444445',
(int) 2 => '444444446',
(int) 3 => '444444447',
(int) 4 => '444444448'
)
)
我需要更改背景颜色,以便数组的每个成员都有自己的颜色。
示例:如果我有 3 个数组,我需要 3 种不同的颜色。 谢谢!
【问题讨论】:
标签: javascript php html arrays