Welcome Guest, Not a member yet? Register   Sign In
How to add attributes to table rows?
#1

Hi,

I been reading through the table class and see how I can add attributes to table cells, but I can't find any where else on where to add attributes on table rows.

I know I can use the set_template method.. But the problem is that I need to be adding unique attributes to a table row using a foreach loop.

Does anyone know how I can accomplish this?

Any help would be really appreciated!
Reply
#2

(This post was last modified: 03-01-2016, 03:34 AM by keulu.)

i don't know if you can do it with add_row()

PHP Code:
$cell = array('data' => 'Blue''class' => 'highlight''colspan' => 2);
$this->table->add_row($cell'Red''Green'); 

this is for a cell, but try that

PHP Code:
$cell = array('data' => array('Red''Green''Blue'), 'class' => 'highlight');
$this->table->add_row($cell); 

maybe that work but personnaly, i don't use this lib.
Reply
#3

Hey keulu. Thanks for the reply. Unfortunately that did not work.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB