[eluser]ywftdg[/eluser]
Its been a few years since I have gotten dirty with CI, but here i am back at it. I am trying to understand the logic of one thing though. I have a current controller, which loads up some data into an array. I then loop through that array in the view to get the tables. My problem is, I am trying to add another array into this data in the controller, but no idea how to get this to work right.
In my controller function, I am trying to add something like this:
Code:
foreach ($data['application_list'] as $app) {
$this->db->where('id', $app->user_id);
$data['application_list']['username'] = $this->user_model->get_one_user();
}
basically, I need to add in this 'username' value to the array $data['application_list'].
Any ideas on this? I hope this makes some sense?