Welcome Guest, Not a member yet? Register   Sign In
Scope of $data problems
#7

[eluser]A_funs[/eluser]
Thanks CroNIX,

I am getting pretty close to having what I believe to be an adequate understanding of OO principles, This one distinction between properties and variables seems to be escaping me though.

If within my object I declare a public variable like "public $testdata" am I not making that variable available to all methods?

Or is what I am really doing declaring a public property, which if I want to use across methods, I need to refer to as such with $this->testdata?

thanks again


Messages In This Thread
Scope of $data problems - by El Forum - 06-22-2012, 07:06 AM
Scope of $data problems - by El Forum - 06-22-2012, 07:13 AM
Scope of $data problems - by El Forum - 06-22-2012, 07:37 AM
Scope of $data problems - by El Forum - 06-22-2012, 07:46 AM
Scope of $data problems - by El Forum - 06-22-2012, 07:51 AM
Scope of $data problems - by El Forum - 06-22-2012, 09:14 AM
Scope of $data problems - by El Forum - 06-22-2012, 10:14 AM
Scope of $data problems - by El Forum - 06-22-2012, 10:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB