Welcome Guest, Not a member yet? Register   Sign In
Call a constructor value in my view
#1

[eluser]breaddes[/eluser]
I set the following in my controller constructor:

Code:
$this->countries = array('Deutschland'=>'de', 'Belgien'=>'be', 'Lichtenstein'=>'li', 'Luxemburg'=>'lu', 'Österreich'=>'at', 'Schweiz'=>'ch');

Now I would like to use $this->countries in my view. Normally I would send it with my $data-parameter, but I need that in each function of my controller and I think there must be a better way to do it so. Otherwise I would have to write 10 times $data['countries'] = $this->countries.


Messages In This Thread
Call a constructor value in my view - by El Forum - 02-16-2008, 10:28 AM
Call a constructor value in my view - by El Forum - 02-16-2008, 10:57 AM
Call a constructor value in my view - by El Forum - 02-16-2008, 11:02 AM
Call a constructor value in my view - by El Forum - 02-16-2008, 11:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB