On Thu, 18 Jul 2002 08:40:08 -0600, you wrote:
See below...
>At 09:20 PM 7/17/02 -0500, Michael Sims wrote:
>
>>$superglobals = array("var1", "var2", "var3", "var4", "var5", "...");
>>
>>Now inside the function you can do this:
>>
>>function somefunction ($somevar) {
>>
>> global $superglobals
At 09:20 PM 7/17/02 -0500, Michael Sims wrote:
>$superglobals = array("var1", "var2", "var3", "var4", "var5", "...");
>
>Now inside the function you can do this:
>
>function somefunction ($somevar) {
>
> global $superglobals;
> foreach($superglobals as $varname) {
> global $$varname; //r
[snip]
Chris, thanks for describing your method. The reason I really dislike
Functions in PHP is because you have to pass every variable needed by a
function, even if that variable is global in the main script, which is a
pain in the ass when a function needs a long string of variables. It makes
i
> >Chris, thanks for describing your method. The reason I really dislike
> >Functions in PHP is because you have to pass every variable needed by a
> >function, even if that variable is global in the main script, which is a
> >pain in the ass when a function needs a long string of variables. It
ma
On Wed, 17 Jul 2002 17:46:25 -0400, you wrote:
>Chris, thanks for describing your method. The reason I really dislike
>Functions in PHP is because you have to pass every variable needed by a
>function, even if that variable is global in the main script, which is a
>pain in the ass when a function
Chris, thanks for describing your method. The reason I really dislike
Functions in PHP is because you have to pass every variable needed by a
function, even if that variable is global in the main script, which is a
pain in the ass when a function needs a long string of variables. It makes
it easie
I am not sure about efficiency, myself and I often ask this without much if
anything at all for a response. However, I am the opposite of you, in that I
prefer to create a library file containing all the functions. To make
developing the page in something like Dreamweaver or Frontpage easier, I
gl
7 matches
Mail list logo