Re: [PHP] Re: Includes vs. Functions

2002-07-18 Thread Michael Sims
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

Re: [PHP] Re: Includes vs. Functions

2002-07-18 Thread Rick Widmer
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

RE: [PHP] Re: Includes vs. Functions

2002-07-18 Thread Jay Blanchard
[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

RE: [PHP] Re: Includes vs. Functions

2002-07-17 Thread Martin Towell
> >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

Re: [PHP] Re: Includes vs. Functions

2002-07-17 Thread Michael Sims
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