Re: [PHP] Scope problem in while loop

2002-03-11 Thread Lars Torben Wilson
On Mon, 2002-03-11 at 18:51, Randall Perry wrote: According to the PHP 4 docs all variables are global unless within a function. I've got the following test code which should output 2, but outputs 1. The while loop creates it's own class object (which seems strange since it isn't explicitly

RE: [PHP] Scope problem in while loop

2002-03-11 Thread Demitrious S. Kelly
I may be wrong, but that's exactly what I ended up having to do... but don't quote me - I'm just learning OOP http://www.apokalyptik.com/forum/viewtopic.php?topic=140forum=60 -Original Message- From: Randall Perry [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 6:52 PM To:

Re: [PHP] Scope problem in while loop

2002-03-11 Thread Randall Perry
Whoops, you're right. Classic 'C' mistake using = instead of ==. Never mind :( On Mon, 2002-03-11 at 18:51, Randall Perry wrote: According to the PHP 4 docs all variables are global unless within a function. I've got the following test code which should output 2, but outputs 1. The while