Re: note 11674 added to Classes and Objects

From: Date: Thu, 01 Mar 2001 23:15:00 +0000
Subject: Re: note 11674 added to Classes and Objects
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-11751@lists.php.net to get a copy of this message
Actually, it does work, although you should not be using one of the reserved words for a method name, and should also use the correct method reference, run: class foo { var $var; function foo() { $this->var = true; } function p() { print($this->var); for ($i = 0; $i < 5; $i++) { print($this->var); } } } $class = new foo; $class->p(); Will coalesce all your notes into one and add the comment above, so other people that can benefit. --- teriumNOSPAM@techie.com wrote: > Actually, don't erase it.. it didn't work > > http://www.php.net/manual/en/language.oop.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto <jmcastagnetto@php.net> __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.notes (#11751) next »