How to initialize variable array as public? |
[eluser]anna16[/eluser]
Hi guys I have this simple problem. Every time i call a view file in each function i created, I always initialized these variables. example; Code: function email_userpass() How do i simplify this? So that all the methods that needs these variables will use these variables without re-declaring them again and again? Thank in advanced.
[eluser]SPeed_FANat1c[/eluser]
I guess this should help you: http://ellislab.com/forums/viewthread/175239/
[eluser]pickupman[/eluser]
That was my code I posted in the other thread. Albeit you have a similar question, the simple answer is: Code: $this->load->vars($data); //Make $data available to all views As mentioned in the thread creating a $data property and using $this->data makes it available to any method/view to use.
[eluser]InsiteFX[/eluser]
pickupman is correct! You can read up on this in the CodeIgniter User Guide. CodeIgniter Loader Class InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |