[eluser]souri84[/eluser]
Hello everybody,
I have a little problem :
I want to add a class for some < tr > tags in my html table.
Here is my code :
Code:
foreach($paquet as $key => $val)
{
$array_ss_totaux = array(7, 14, 20, 27, 31, 34, 39);
if(in_array($key, $array_ss_totaux))
{
$tmpl = array('row_start' => '<tr class="Test">');
$ci->table->set_template($tmpl);
}
else
{
$tmpl = array('row_start' => '<tr>');
$ci->table->set_template($tmpl);
}
if($key >=42)
{
$cell = array('data' => '', 'class' => 'test2', 'colspan' => 2);
$ci->table->add_row($val[0],
$cell,
number_format($val[1] + $val[2],2,',',' '));
}
else
{
$ci->table->add_row($val[0],
number_format($val[1],2,',',' '),
number_format($val[2],2,',',' '),
number_format($val[1] + $val[2],2,',',' '));
}
}
But there is no change... there is no < tr > tag with defined class...
Have you got the same problem ?
Thank you,
Bye and have a good WE !
Edit : Sorry, this is not the good location for this post
Souri84