Menu
I have placed the following code in a PHP script and the global, $tt, does not have a value within the “test()” function. Am I missing something so simple I cannot see it?
[code]
$tt = 10;
print_r(“tt: ” . $tt . “<br>”);
// Test
function test() {
global $tt;
print_r(“tt inside: ” . $tt . “<br>”);
}
print_r(“I am here<br>”);
test(); exit;
Many thanks…
Todd