I am using following code for fetch records. My code is working fine but it returns a array not a object. Any guess why this happening..
$select = $this->_db->select()
$select->from('users',array('id'));
if($where != '')
{
$select->where($where);
}
$data = $this->_db->fetchRow($select);
Current output: echo $data['id'];
desire output: echo $data->id;