jj20051 Posted November 8, 2010 Share Posted November 8, 2010 Is there a way to use extract to make session variables? If so how would you go about doing it? Quote Link to comment Share on other sites More sharing options...
jj20051 Posted November 8, 2010 Author Share Posted November 8, 2010 On a side note is it possible to make a list of variables (IE an array full of variable names) globals? and once again if so how would I do it? Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted November 8, 2010 Share Posted November 8, 2010 extract() extract an array of variables, values into the current scope (global, local). Some example from you would help, but to make session vars out of individual vars you could: $var1 = 1; $var2 = 2; $_SESSION = compact('var1', 'var2'); As for the other question, that's what extract() is used for. More specifics would help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.