[eluser]rpe[/eluser]
Usually if we want to parse a variable, we need to define it first. Can we do the opposite way? Parsing first and define the variable later??
Example :
1.>This is what I usually do, I define the variable first, I put it in var.php.
Code:
class Example extends Controller{
function index(){
data['variable']=$this->load->view('variable','',TRUE);
$this->load->view('display');
}
}
then I use the variable in display.php
Code:
<html>
<head></head>
<body>
{variable}
</body>
</html>
2.>But, what I want is this, I use the variable first (in display.php)
Code:
<html>
<head></head>
<body>
{variable}
</body>
</html>
then I parse using this (var.php)
Code:
data[$var]=$this->load->view($var);
Thanks before.