I am using a wordpress template in php like this:
...Hello World...
Simply replace:
with:
;
and the variable will be in scope. Try to avoid using globals.