Jump to content

is there a way to echo out all the variables that are in use ?


jasonc

Recommended Posts

What I would like to find out is how I can echo out all the variables that are in use in the visitors visit.  And have these echoed on the page. (for error checking purposes)  some of my variables i.e.  $username  or $email and a few others are being cleared of its content and I can not find any problems searching all the files for the variable name and checking the lines but think that some other variable is in turn causing theproblems.  so wanting to find a way to place an echo line that shows all the variables and then have the next line

 

exit;

 

and just move these two new lines around my scripts to find out where the problems might be.

Link to comment
Share on other sites

Also, instead of moving the debugging code around, I would suggest creating a debugging function that you can reference many places in your script. Make the function so that you can set a value to determine whether debugging is on or off. If off,t he function does nothing. You could also have the function compare the GLOBAL values between calls so you can see where the value is getting set or changes.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.