add_row([$args = array()[, ...]])
Parameters: |
|
---|---|
Returns: |
CI_Table instance (method chaining) |
Return type: |
CI_Table |
Permits you to add a row to your table. You can submit an array or discrete params:
1 2 3 | $this ->table->add_row( 'Blue' , 'Red' , 'Green' ); $this ->table->add_row( array ( 'Blue' , 'Red' , 'Green' )); |
If you would like to set an individual cell’s tag attributes, you can use an associative array for that cell. The associative key data defines the cell’s data. Any other key => val pairs are added as key=’val’ attributes to the tag:
1 2 3 4 5 | $cell = array ( 'data' => 'Blue' , 'class' => 'highlight' , 'colspan' => 2); $this ->table->add_row( $cell , 'Red' , 'Green' ); // generates // <td class='highlight' colspan='2'>Blue</td><td>Red</td><td>Green</td> |
Please login to continue.