OOP variables

From: Date: Thu, 15 Apr 2004 08:27:00 +0000
Subject: OOP variables
Groups: php.general 
Request: Send a blank email to php-general+get-183427@lists.php.net to get a copy of this message
Hello, I was wondering if somebody would mind explaining this to me, is there a big difference or requirement to pre defining variables your going to use in a class eg: class name { $var1 = ''; $var2 = ''; function blah(){ $var2.... } }//-- End class Or is this also right class name { function name(){ $this->var1 = ''; $this->var2 = ''; } function blah(){ .... } }//-- End class Thanks Jarratt

« previous php.general (#183427) next »