Welcome Guest, Not a member yet? Register   Sign In
Echo If Isset Function
#8

[eluser]Aken[/eluser]
Variables from the $data array in your controller, when passed to the view, go through PHP's extract() function. That's what makes them go from $data['some_value'] in the controller to $some_value in the view. They are NOT globals - they're created locally when the view is parsed (loaded).

Having globals is asking to have conflicts with variable names at some point. It seems pretty unnecessary in most cases when using CI.


Messages In This Thread
Echo If Isset Function - by El Forum - 01-23-2012, 04:12 PM
Echo If Isset Function - by El Forum - 01-23-2012, 04:22 PM
Echo If Isset Function - by El Forum - 01-23-2012, 04:26 PM
Echo If Isset Function - by El Forum - 01-23-2012, 04:28 PM
Echo If Isset Function - by El Forum - 01-23-2012, 04:32 PM
Echo If Isset Function - by El Forum - 01-23-2012, 04:47 PM
Echo If Isset Function - by El Forum - 01-23-2012, 05:27 PM
Echo If Isset Function - by El Forum - 01-23-2012, 05:31 PM
Echo If Isset Function - by El Forum - 01-23-2012, 05:34 PM
Echo If Isset Function - by El Forum - 01-23-2012, 05:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB