[eluser]bigdaddysheikh[/eluser]
Hey guys,
I have been searching for this topic for quiete sometime and have not found what I am looking for. So here it goes.
I keep having undefined errors from CI. Although it is not PHP errors, I know it is bad practice. First, is there a way to define these variables in the controller so it can be sent through different functions.
Currently, I am trying to use a variable that will hold URLS that I want to display in many sub functions of the mother controller. Rather than me declaring this variable in every function, how can I set this variable only once.
Last but not least, is there a better way to pass arrays to views.
example
Code:
$data["foo"][0] = "test";
$data["foo"][1] = "test1";
I did try this, but it does not work:
Code:
$data["foo"] = "test";
$data["foo"] = "test1";