[eluser]PhilTem[/eluser]
If you want to know more about the functionality provided by
$this->load->view I'd suggest you read the source code since it helps understanding this crucial part of CI very well.
Just to mention some functions used by
$this->load->view
Code:
extract();
ob_start();
ob_get_contents();
These methods actually prevent returning values from any view to what is executed after the view was loaded.
But you may do something like this
In the controller
Code:
function your_function()
{
// do your stuff here
// then create a variable of the class
$this->data = array();
// do whatever you want to do know
}
in view a.php
Code:
<p>some text<p>
<?php
$this->load->view('b');
?>
in view b.php
Code:
<p>some text<p>
<?php
<p><?php $this->data['awesome_key'] = 'awesome value'; ?>
?>
From my understanding of CI, this should access the variable $this->data we defined further above in the controller. But I'm not sure and unable to test at the moment