Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi,

Is it possible to show all the variables and their values in an entire script?

 

I looked up the PHP manual and tried things like 'get_defined_vars()', 'print_r()', or 'var_dump()' but couldn't get them to work. They all seemed to want to know the name of the variable, whereas I want to know what variables exist. It's actually connected to my last question about sessions. I've created a script that calculates a quote for curtains (believe it or not!) which is surprisingly complicated. What is even more surprising is that it worked! However, I now want to assign all the quote criteria to a session (to save on a DB once the user has registered). Rather than trawl through the entire script adding one variable after the other I thought it might be quicker if I could just get a list of them all and cut and paste.

 

Thanks.

Paul

Link to comment
Share on other sites

 Share

×
×
  • Create New...