newb in OOP
View Single Post
10-08-2008, 10:14 AM
Join Date: Nov 2007
And usually, as an adittion to Salathe, you should never use $this-> in defining function variables. If it is a local function as in private and will be used in another one, it's fine, but you should not use it in the name itself, because $this defined the object and not passing a variable. Once defined IN the function, you can use $this. :)
As Salathe said, define first, then use. You can't set them manually and leave them blank.
The smartest thing to do, if you want this, is to create a simple function like mySQLinit(); and put every $this-> value in there, with a value (usually = '', = false or = -1).
"Life is a bitch, take that bitch on a ride"
View Public Profile
Send a private message to ReSpawN
Visit ReSpawN's homepage!
Find More Posts by ReSpawN