So why not use: get_defined_vars()? Returns an array of all defined variables :-)
-Shawn "Jake McHenry" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 26, 2004 6:12 PM > Subject: Re: [PHP] Re: variable container? > > > > Hello Jake, > > > > On 26 Jan 2004 at 17:55, Jake McHenry wrote: > > > > > I want a list of all variables used. I tried just putting var_dump() but > got > > > an error. I'd like to see a list of all variables being used in the > script, > > > then I can start cleaning original code and what I have added. Some > strange > > > results lead me to believe I'm declaring the variables more than once > with > > > different values, and I'd like to know if there is a way that I can just > get > > > a dump of ALL the variables in use. Unless I'm using the function wrong. > > > Please advise. > > > > I don't think you can print out *all* the variables in *all* scopes and > their values, but you > > can certainly get a list of all the variables in the global scope (i.e. > all variables except the > > ones created inside functions and classes). print_r ($GLOBALS) will give > you all the > > super-global arrays ($_POST, $_GET, $_SERVER etc) as well as all user > variables > > created in the global scope. Look for *RECURSION* in the output; that's > where you'll > > find the user variables. > > > > Hope this helps, > > > > Erik > > > > I think this may be it. I'll try it and let everyone know. > > Thanks! > > Jake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php