i want to pass a javascript string to php ... WHICH is RIGHT after the code .. in the script.
Your example is somewhat confusing:
Because if I do this:
Then it sets the JavaScript value of myvar to the PHP value of $myvar so they both stay the same. If you're trying to do something else you need to expand your example.
myvar
$myvar