[eluser]Unknown[/eluser]
My model code is
$this->db->select('makeId','makename');
$this->db->from('lk_make');
$this->db->where('status','0');
$query = $this->db->get();
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
line 249 -------------- $options[ $row['makeId'] ] = $row['makename'];
}
return $options;
}
My Controller code is
$data['lkmake'] = $this->ads_model->Getmake(); //make
$this->load->view('ads/ad_add_form',$data);
My view code is
<?=form_dropdown('makeId',$lkmake)?>
But i am still getting an error "Fatal error: Cannot use object of type stdClass as array in C:\xampp\htdocs\dev.com\system\application\models\ads_model.php on line 249"
i am newbie in CI world please guide where i am doing wrong.