RE: [PHP] scope problem
| From: | Larry Brown | Date: | Fri, 05 Mar 2004 18:39:00 +0000 |
| Subject: | RE: [PHP] scope problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179588@lists.php.net to get a copy of this message | ||
Thanks for the help, but it turned out to be the nut on top of the keyboard!
Something I missed. Good to know my concept of scope with php is still
healthy (at least).
Thanks
-----Original Message-----
From: Richard Davey [mailto:rich@launchcode.co.uk]
Sent: Friday, March 05, 2004 11:17 AM
To: PHP List
Subject: Re: [PHP] scope problem
Hello Larry,
Friday, March 5, 2004, 4:01:39 PM, you wrote:
LB> This gives values something to the tune of...
LB> 200
LB> 400
LB> 700
LB> 100
Hard to say with so little code, but...
Your first where loop is probably running twice, i.e. resetting
variable back to 100 after the 2nd (internal) where loop has finished
modifying it. Move $variable = 100 above the first where loop and see
what happens.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php