Welcome Guest, Not a member yet? Register   Sign In
Global $data array?
#2

[eluser]skunkbad[/eluser]
There are a few different ways you could make an array that is global. If you need the array to be present only in views, you could use $this->load-vars() in a MY_Controller. If you want to have the array available in controllers, libraries, models, etc., then you could put the array in a pre-init hook. You could also try loading the array into a constant in your application/config/constants.php file. There are some other ways too, but I think these three were the first in my head.


Messages In This Thread
Global $data array? - by El Forum - 07-03-2011, 06:43 AM
Global $data array? - by El Forum - 07-03-2011, 07:29 AM
Global $data array? - by El Forum - 07-03-2011, 04:46 PM
Global $data array? - by El Forum - 07-03-2011, 05:37 PM
Global $data array? - by El Forum - 07-03-2011, 06:38 PM
Global $data array? - by El Forum - 05-10-2012, 06:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB