Hi everyone,
i have a pretty simple q for you. I have 2 functions. In the first one there is a var named "status" and in the second function i want to use it. But if i echo the value of the var in the second function there is no value anymore. I thought i have to make them global ut even that did not work (i think i got the use of global vars wrong)
Code:
<?
global $var;
function test(){
$var = "Hello World";
}
function sayhi(){
echo "Hello, var has $var as its value.";
}
test();
sayhi();
?>
i know that i could call the second function from the first one and give a parameter to the secondbut that is not what i want. The thing i want to achive is much more complex than this little example.
thanks for any help
regards ali