Add Rows
The add_rows() method is used to define a group of body rows in your table.
add_rows(array row)
- row: an array of row arrays for the table | required
Example:
$data = array(
array('Fred', 'Blue', 'Small'),
array('Mary', 'Red', 'Large'),
array('John', 'Green', 'Medium')
);
$this->badtable->add_rows($data);
add_rows (array row [,array attributes])
- row: an array of row arrays for the table | required
- attributes: an array of row attributes. | optional
The key specified in the attributes array will relate to the row number the attributes are applied.
Example:
$data = array(
array('Fred', 'Blue', 'Small'),
array('Mary', 'Red', 'Large'),
array('John', 'Green', 'Medium')
);
$attr = array(
0 => array('class' => 'highlight'),
2 => array('class' => 'highlight')
);
$this->badtable->add_rows($data, attr);