In codeigniter, I retrieve database results and store it in a variable like the following:
$data['user'] = $this->some_model->get_by_id($id);
Say the above retrieves only the user_id and the user_name, so the variables will be
$data['user']->user_id;
$data['user']->user_name;
Now, say, I want to assign another value (eg. age), can I do the following?
$data['user']->age = '23';