get_defined_vars — Returns an array of all defined variables
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>get_defined_vars() </title> </head> <body text="#000080" bgcolor="#EAE6F2"> Body Text : get_defined_vars() <br/> <?php $b = array(1, 1, 2, 3, 5, 8); $host= array ( gethostbyname("http://manas8x"), gethostbyname("http://manas6"),gethostbyname("http://frontiersoft.net")); foreach($b as $b_key => $b_value){ echo "\t ".$b_value.","; } echo"<br/>"; foreach($host as $g_key => $g_value){ echo "\t ".$g_value.","; } ?> <br/> <?php $arr = get_defined_vars(); $xyz = get_defined_vars(); $arr["b"]; $xyz["host"]; foreach( $xyz as $h_key => $h_value){ echo "<table border='1' width='300px'><tr><td width='200px'>$h_key</td><td width='100px'>$h_value </td></tr></table>"; } ?> </body> </html>