[eluser]haris244808[/eluser]
[quote author="TheFuzzy0ne" date="1362915452"]Welcome to the CodeIgniter forums!
If you put that logic in your view, it will work exactly as you expect.
When you pass $data to your view, each entry of the array is extracted and made available to your view. So $data['query'] becomes $query within your view. Outside of the view, you still need to access it using $data['query'].[/quote]
THank you for ur fast reply.
I know how data are shown in view, but thats the problem, because it says that $query is undevfined variable in my view.
Here is my controller so far:
Code:
$this->load->model('users_model');
$data['query'] = $this->users_model->select_all_users();
$this->load->view('newFile_view', $data);
so when i go ti newFil_view and try to print_r($query);
ir says that $query its undefined variable