title: cannot pass php variables to javascript: SyntaxError: "" string literal contains an unescaped line break
body: <p>Hello I am trying to pass a php variable to a javascript file like this:</p>
  
  <pre><code> var base = "&lt;?php echo $_SESSION['idata'];  ?&gt;";
  </code></pre>
  
  <p>But when consoling I get this error:</p>
  
  <pre><code>SyntaxError: "" string literal contains an unescaped line break
  </code></pre>
  
  <p>Any advice could help, thanks.</p>