Re: PHP4 vs PHP5 classes

From: Date: Tue, 29 Jul 2008 06:38:39 +0000
Subject: Re: PHP4 vs PHP5 classes
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-277412@lists.php.net to get a copy of this message
jeff.mills@winsto.net wrote: >> Since the Players method is a constructor, it's more about how you set >> the object(s) up. >> >> What does the loop look like before you create a new object? >> > > Well see here is where it gets messy! This is not my code - I've ported a > phpnuke module over to dragonflycms. > > The $players object is created before the loop: > $players = new Players($lid); <snip> Which means the code is only executed once since it's in the constructor. It's not changing per loop because you're not calling the code. Maybe setting $this->max should be done in fetchSelectData since that's what is causing/creating your loop. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#277412) next »