Monday, May 16, 2016

Create array in Codeigniter model

$tmpHash = array();
foreach ($this->db->get()->result_array() as $row)
{
 $tmpHash[$row['ID']] = $row['ID'];
}
return $tmpHash;