Possible Duplicate:
PHP: Global variable scope
How can I set a variable outside a function from inside the function? Here is what I mean:
$myVar = false;
function myFunction($param1 $param2){
....
if($param1 == $x){
$myVar = $param1;
}
}
$myVar seems to always stay empty. How can I do this?
Thank you!