Today in the #scriptschool chat we talked about how to get the current defined variables used in a script. Check out the following code which illustrates the use of get_defined_vars(). The variables set will be at the end of the output:
<?php
$myname = ‘TDavid’;
$mydomains = array(‘http://www.php-scripts.com’,‘http://www.tdscripts.com/’);
$arr = get_defined_vars();
echo ‘<pre>’;
var_dump($arr);
echo ”;
?>
$myname = ‘TDavid’;
$mydomains = array(‘http://www.php-scripts.com’,‘http://www.tdscripts.com/’);
$arr = get_defined_vars();
echo ‘<pre>’;
var_dump($arr);
echo ”;
?>
This is particularly useful for keypoint checking/debugging.

< b >< a href=”http://just.45miles.de/DonnaRrbi” >long haircuts< /a >< /b >< /blockquote >
Just wish to say your article is as amazing. The clarity in your post is simply great and i could assume you are an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post. Thanks a million…
on February 5th, 2012 at 9:53 pm | #Link Comment< b >< a href=”http://ftf90.com/s2s/NormaBbpw” >short hairstyles< /a >< /b >< /blockquote >
Hello, i think that i saw you visited my blog so i came to “return the favor”.I’m trying to find things to enhance my web site!I suppose its ok to use some of your ideas!!
on February 5th, 2012 at 11:13 pm | #Link Comment