ID: 9164
Updated by: waldschrott
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Bogus
Bug Type: Scripting Engine problem
Assigned To: waldschrott
Comments:
please read the manual on how to use class members
hint: the second $ sign is _not_ needed
$this->variable='foo';
Previous Comments:
---------------------------------------------------------------------------
[2001-02-07 16:26:14] [EMAIL PROTECTED]
Your code is incorrect, try this:
function Bjbase($antal){
$this->lekar=$antal;
$this->dragna=array();
$this->ess=58;
echo $this->dragna;
}
---------------------------------------------------------------------------
[2001-02-07 16:21:44] [EMAIL PROTECTED]
function Bjbase($antal){
$this->$lekar=$antal;
$this->$dragna=array();
$this->$ess=58;
echo $this->$dragna;
}
this is a constructor
the echo statement prints 58 even though that it is $ess that is initialized to 58.
The variable $dragna is not treated as an array anywhere but when the $ess line is
gone it works fine.
tried at another server too.
is this a problem you know of?
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9164&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]