Looping Through the $GLOBALS Array : GLOBALS « Language Basics « PHP






Looping Through the $GLOBALS Array

<html>
<head>
<title>Looping through the $GLOBALS array</title>
</head>
<body>
<?php
foreach ( $GLOBALS as $key=>$value ){
   print "\$GLOBALS[\"$key\"] == $value<br>";
}
?>
</body>
</html>

           
       








Related examples in the same category

1.Set new value into GLOBALS values
2.$GLOBALS with property
3.Accessing Global Variables with the global Statement
4.Create global variables
5.Modifying a Variable with $GLOBALS
6.Global vs function level
7.Overriding Scope with the GLOBALS Array