Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Revisions

3 of 3
Commonmark migration

try this instead

var newVar = "<?php echo $value; ?>";

PHP doesn't emit anything unless it's been told to do so. ;)

Update

Your script is processed on the client side, after the server is done parsing the php. If you need to update some information on the server after the page has loaded on the client's browser, AJAX is the way to go.

Shad
  • 15.5k
  • 2
  • 24
  • 34

AltStyle によって変換されたページ (->オリジナル) /