Welcome Guest, Not a member yet? Register   Sign In
rookie question - Sharing variable between functions
#2

[eluser]nelson.wells[/eluser]
Message could be a member of the controller class (in this case, Test). Instead of saying $message = "blah blah"; you would do $this->message = "blah blah blah". Since it is a member of the class, it doesn't go out of scope.


Messages In This Thread
rookie question - Sharing variable between functions - by El Forum - 04-15-2010, 02:00 PM
rookie question - Sharing variable between functions - by El Forum - 04-15-2010, 02:30 PM
rookie question - Sharing variable between functions - by El Forum - 04-15-2010, 04:08 PM
rookie question - Sharing variable between functions - by El Forum - 04-15-2010, 04:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB