Re: Retrieving values from array on a class

From: Date: Mon, 16 Oct 2006 20:56:34 +0000
Subject: Re: Retrieving values from array on a class
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-243200@lists.php.net to get a copy of this message
# ceo@l-i-e.com / 2006-10-16 12:47:47 -0500: > On Sat, October 14, 2006 5:18 pm, Kevin Waterson wrote: > >>>class returnConfigParams > >>> { > >>> > >>> var $a; > > >>> function getMySQLParams() > >>> { > >>> include($_SERVER['DOCUMENT_ROOT']."/properties.php"); > >>> > >>> $values = array(0 => $a, 1 => $b, 2 => $c, 3 => $d); > > You probably want $this->a instead of $a > > And that also assumes you are using $this->a inside of properties.php... > > But I don't think you can even *DO* an include() inside a class > definition, so that should be giving you an error... You can include inside a function or method. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991

« previous php.general (#243200) next »