Welcome Guest, Not a member yet? Register   Sign In
variable in function of view
#1

[eluser]shkim[/eluser]
I want to use a variable $abcde in a function of a view like the following code:

---------------------------------------
controller:
$data['abcde'] = 1;
$this->load->view('myview', $data);


myview:
function xxx()
{
$yyy = $abcde; <-- undefined variable error
}

$zzz = $abcde; <-- ok

---------------------------------------

What's wrong with me?


Messages In This Thread
variable in function of view - by El Forum - 07-06-2007, 02:44 PM
variable in function of view - by El Forum - 07-06-2007, 10:59 PM
variable in function of view - by El Forum - 07-06-2007, 11:26 PM
variable in function of view - by El Forum - 07-06-2007, 11:59 PM
variable in function of view - by El Forum - 07-07-2007, 05:28 AM
variable in function of view - by El Forum - 07-07-2007, 06:00 PM
variable in function of view - by El Forum - 07-07-2007, 09:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB