Codeigniter: Using data in a controller
- by Kevin Brown
I'm new to php and CI, and I'm having some trouble in my controller.
I feel that I'm doing this the wrong way, and it could be easier, I just don't know the syntax:
$data['members'] = $this->home_model->getUser($id);
$credit = $this->home_model->getCredit($id);
if ($credit == '0'){stuff...}
So I'm getting the user's data that has their the same information as "getCredit" does, but I don't know how to get the single variable that I need for my if statement...
How can I just use the "getUser" function so that I'm not pulling redundant information?