Re: PHP4 vs PHP5 classes

From: Date: Tue, 29 Jul 2008 07:07:24 +0000
Subject: Re: PHP4 vs PHP5 classes
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-277415@lists.php.net to get a copy of this message
jeff.mills@winsto.net wrote: >>> 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. > > Thanks Chris, I will give that a shot. > Just to confirm, this script works just fine in php4, so do we put that > down to pure luck, or has there been a change in php5 that will be causing > it? No idea why it works in php4 - if you're only calling the "Players" method once (or through the constructor) it should have behaved the same in php4. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#277415) next »