CI_Table::make_columns()

make_columns([$array = array()[, $col_limit = 0]]) Parameters: $array (array) – An array containing multiple rows’ data $col_limit (int) – Count of columns in the table Returns: An array of HTML table columns Return type: array This method takes a one-dimensional array as input and creates a multi-dimensional array with a depth equal to the number of columns desired. This allows a single array with many elements to be displayed in a table that has a fixed column count. Consider thi

CI_Session::__set()

__set($key, $value) Parameters: $key (string) – Session item key $value (mixed) – Value to assign to the session item key Returns: void A magic method that allows you to assign items to $_SESSION by accessing them as $this->session properties: $this->session->foo = 'bar'; // Results in: // $_SESSION['foo'] = 'bar';

CI_Session::__get()

__get($key) Parameters: $key (string) – Session item key Returns: The requested session data item, or NULL if it doesn’t exist Return type: mixed A magic method that allows you to use $this->session->item instead of $_SESSION['item'], if that’s what you prefer. It will also return the session ID by calling session_id() if you try to access $this->session->session_id.

CI_Session::userdata()

userdata([$key = NULL]) Parameters: $key (mixed) – Session item key or NULL Returns: Value of the specified item key, or an array of all userdata Return type: mixed Gets the value for a specific $_SESSION item, or an array of all “userdata” items if not key was specified. Note This is a legacy method kept only for backwards compatibility with older applications. You should directly access $_SESSION instead.

CI_Table::add_row()

add_row([$args = array()[, ...]]) Parameters: $args (mixed) – An array or multiple strings containing the row values 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: $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

CI_Table

class CI_Table $function = NULL Allows you to specify a native PHP function or a valid function array object to be applied to all cell data. $this->load->library('table'); $this->table->set_heading('Name', 'Color', 'Size'); $this->table->add_row('Fred', '<strong>Blue</strong>', 'Small'); $this->table->function = 'htmlspecialchars'; echo $this->table->generate(); In the above example, all cell data would be ran through PHP’s htmlspecialchars() f

CI_Session::tempdata()

tempdata([$key = NULL]) Parameters: $key (mixed) – Tempdata item key or NULL Returns: Value of the specified item key, or an array of all tempdata Return type: mixed Gets the value for a specific $_SESSION item that has been marked as “tempdata”, or an array of all “tempdata” items if no key was specified. Note This is a legacy method kept only for backwards compatibility with older applications. You should directly access $_SESSION instead.

CI_Session::unset_userdata()

unset_userdata($key) Parameters: $key (mixed) – Key for the session data item to unset, or an array of multiple keys Return type: void Unsets the specified key(s) from the $_SESSION superglobal. Note This is a legacy method kept only for backwards compatibility with older applications. It is just an alias for unset($_SESSION[$key]) - please use that instead.

CI_Session::unmark_flash()

unmark_flash($key) Parameters: $key (mixed) – Key to be un-marked as flashdata, or an array of multiple keys Return type: void Unmarks a $_SESSION item key (or multiple ones) as “flashdata”.

CI_Session::set_userdata()

set_userdata($data[, $value = NULL]) Parameters: $data (mixed) – An array of key/value pairs to set as session data, or the key for a single item $value (mixed) – The value to set for a specific session item, if $data is a key Return type: void Assigns data to the $_SESSION superglobal. Note This is a legacy method kept only for backwards compatibility with older applications.