PHP Code:
function get_from_options(){
$table_name = array();
$table_content = array();
$this->load->database();
$query = $this->db->query("SELECT * FROM `options`");
$row = $query->row_array();
foreach ($query->result_array() as $row)
{
array_push($table_name, $row['name']);
array_push($table_content, $row['content']);
}
return array_combine($table_name, $table_content);
}
for now, just the poor code above that i can create (using codeigniter)

that code can result like what i want
PHP Code:
$site_details = get_from_options()
/*
will result like below
$site_details = array(
'site_name' => 'Just My site',
'site_email' => 'my@somedomain.com',
'site_description' => 'no description here :)',
'site_owner' => 'smansakra girl',
'site_keyword' => 'reni, smansakra, indonesia',
'site_anotherifadded' => 'valuethatadded'
);
*/
Bookmarks