Forum Moderators: coopster

Message Too Old, No Replies

same variables used in 2 included files

         

Sarah Atkinson

3:57 pm on May 24, 2005 (gmt 0)

10+ Year Member



I have 2 seperete files I am including into a script. They uses the same verriables however I want one to execute and then the other. will this be a problem?

DaiWelsh

4:21 pm on May 24, 2005 (gmt 0)

10+ Year Member



Depends if

- the second script properly initialises all of the variables it uses.
- you need to retain any variable values that the first script sets later in your code

If the answers are yes and no respectively there should be no problems.

dreamcatcher

5:11 pm on May 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might be able to unset the variables in the first file after they have been used and then assign new values in the second include file. This would prevent any mix up with the two files.