Re: Listing Declared Variables

From: Date: Tue, 06 May 2003 23:06:21 +0000
Subject: Re: Listing Declared Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146592@lists.php.net to get a copy of this message
At 5/6/2003 04:37 PM, dan.tappin@orourke-eng.com wrote:
Is there an easy way to list the declared variables in a PHP file?
I'm just pulling this out of my butt, but you should be able to do this: <? $thisArray = get_defined_vars(); foreach ($thisArray as $key => $value) { echo $key." : ".$value." <br />\n"; } ?> and get a list of every variable that's been set by the current script (at the point that code is run). ~Steve-o -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: skeller@healthtvchannel.org Web: www.healthtvchannel.org

« previous php.general (#146592) next »