CI_Table::_set_from_array PHP Méthode

_set_from_array() protected méthode

Set table data from an array
protected _set_from_array ( array $data ) : void
$data array
Résultat void
    protected function _set_from_array($data)
    {
        if ($this->auto_heading === TRUE && empty($this->heading)) {
            $this->heading = $this->_prep_args(array_shift($data));
        }
        foreach ($data as &$row) {
            $this->rows[] = $this->_prep_args($row);
        }
    }

Usage Example

Exemple #1
0
 function _set_from_array($data, $set_heading = TRUE)
 {
     parent::_set_from_array($data, $set_heading);
     $this->_compile_rows();
 }