Fixed two issues for variables.

https://github.com/Danack/PHP-to-Javascript/issues/10

"Echo with variable has broken

echo "Total is $total";

Should be converted to:

alert( "Total is " + total + "");"

https://github.com/Danack/PHP-to-Javascript/issues/4

First use of a variable in global scope wasn't having a 'var' declared for it.