PHP question (variable scope)?

Phil

New member
function hello() { $foo=1; }
echo $foo;

How can the variable $foo be called outside of the function? The PHP website has information on 'variable scope' which I'm having difficulty understanding:
http://php.net/manual/en/language.variables.scope.php
Any help would be greatly appreciated!

Thanks
 
Back
Top