when you are working with classes and objects in php, and you are coding
inside a class, you must use the $this variable to access the members of the
class, for example:
class test {
//Class vars (something like properties)
var $a;
var $b;
var $c;
var $sum;
//Class function (Constructor)
function test() {
$this->a = 'value for a';
$this->b = 'value for b';
$this->c = 'value for c';
$this->set();
}
//Class function
function set() {
$sum = $this->a . $this->b . $this->c;
}
} //end class
luis.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php