06-21-2008, 03:06 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Apr 2008
Posts: 110
Thanks: 97
|
Clarification on INCLUDE()
Hello all --
A large portion of the PHP program I'm working on is repeated about 2000 times, but before it can be properly initialized at the start of each loop, about 50 variables (counters) have to be set back to 0.
I just want to do this "tidily," if that is a word...
Don't want to do this in a function because I'd have to set all the variables to a global state. Just wondering if I could do this by having the code (setting the variables to 0) in a separate PHP file and include() it at the top of every iteration of the loop...?
Is that an acceptable interpretation of a proper use of include()? I've read the online php.net documentation several times, but I'm still a little unsure on this point.
Thanks!
Dave
|
|
|
|