I want to store my database query result in my view section in a variable.I am trying but not work.
My View code
$cd=''.base_url().'/video/series/';
$count = count($cd);
for ($i = 0; $i < $count; $i++)
{
print'"'.$cd[$i][1].'",';
}
My Controller code
public function series() {
$result= $this->video_model->series_list();
return $result;
}
My Model Code
function series_list()
{
$string = trim($this->input->get_post('term'));
$query = $this->db->query("SELECT name FROM `series` WHERE name LIKE '%".$string."%'");
return $query->row_array();
}
$cd=''.base_url().'/video/series/'; not get any array data ,only get blank data