[eluser]dianikol85[/eluser]
Hi to all. I'll keep it short
Let's say we have a controller and within it two methods.
1) index
2) call_index
In the index method i load a view. In the call_index i call the index but i want to pass a parameter to the view when i run the call_index method. Here is an example of the code
Code:
class Welcome extends CI_Controller {
function index() {
$this>load->view('some_view');
}
function call_index() {
$data['data'] = 'hello world';
$this>index();
}
}
I don't think so that to load the view again in the call_index is a good practice because i probably have already passed data in the index method. For example a pagination.
How i can pass the $data['data'] in the view within the call_index method.