Functions in PHP, just as in any programming language, have to return the value into a variable (or print statment or function pass argument, etc.). $NewId does not enter the global scope because you return it...... returns and globals are 2 very different things. Also, you can't put a variable value assignment statement in a function pass. The following will work
echo bla(34);
or
$someVar = bla(34);
echo $someVar;
-geoff