Re: Use PHP var in PHP generated Javascript?... But in my case I'm generating several javascript code blocks (which ... produce some flash) via a PHP loop, so I need to figure out another ... Ah, so your problem was not that $phpvar did not work, but the generated javascript was incorrect....(comp.lang.php)