Forum Moderators: coopster

Message Too Old, No Replies

Global $this['this'] equal to Global $this

         

bobnew32

4:29 am on Nov 10, 2003 (gmt 0)

10+ Year Member



I put my information into a one variable array, so instead of making everything global in that function, can I just do

global $variable;

instead of

global $variable['1'];
global $variable['2'];

(I dont have access to webspace or I would simply test it out, but i imagine this is possible)

Plus instead of going

global $variable1;
global $variable2;

can I just go

global $Variable1,$varaible2,$variable3?

thx

coopster

12:38 pm on Nov 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes and yes. See Variable Scope [us4.php.net] for more information on using globals.