Re: [PHP] Extending 'include' behavior in a function

2007-01-11 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-11 09:47:04 +0100: >> Eli wrote: >>> [extending include] >>> >>> Your solution is good when you know what variables you want to transfer >>> ahead, and then make a list of them. But if I want to transfer all the >>> variables in the current env

Re: [PHP] Extending 'include' behavior in a function

2007-01-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-11 09:47:04 +0100: > Eli wrote: > > [extending include] > > > > Your solution is good when you know what variables you want to transfer > > ahead, and then make a list of them. But if I want to transfer all the > > variables in the current environment scope? > as it s

Re: [PHP] Extending 'include' behavior in a function

2007-01-11 Thread Jochem Maas
Eli wrote: > Jochem Maas wrote: >> short of playing around with the global keyword >> (which won't work when you call includeIt() from >> another function)) your pretty much stuck. >> >> basically imho you need to rethink what it is your trying to do. >> >> function have their own scope for a reaso

Re: [PHP] Extending 'include' behavior in a function

2007-01-10 Thread Eli
Jochem Maas wrote: short of playing around with the global keyword (which won't work when you call includeIt() from another function)) your pretty much stuck. basically imho you need to rethink what it is your trying to do. function have their own scope for a reason; maybe consider using an arr

Re: [PHP] Extending 'include' behavior in a function

2007-01-10 Thread Jochem Maas
short of playing around with the global keyword (which won't work when you call includeIt() from another function)) your pretty much stuck. basically imho you need to rethink what it is your trying to do. function have their own scope for a reason; maybe consider using an array argument like so:

Re: [PHP] Extending 'include' behavior in a function

2007-01-10 Thread Chris
Eli wrote: Hi, I want to create a function that does some stuff, and then includes another file in the place from where it was called. The idea is to run the included file not in the function, but in the place of the caller in the caller's environment (not in the function environment). For e