title: Intellij syntax highlighting of javascript and php in the same file
body: <p>I have a JavaScript file that needs to have some PHP tags in it. Something like this:</p>
  
  <pre><code>var chart = {
    init: function() {
      ...
      drawChart(this.data);
      ...
    },
  
    data: &lt;?php echo $this-&gt;data ?&gt;
  }
  </code></pre>
  
  <p>The output is obviously a pure JavaScript file and functionally this is working fine. However, IntelliJ isn't correctly highlighting the code. If I name the file with a .js extension, it starts showing errors as soon as it runs across a PHP tag. If I name the file with a .php extension, it doesn't show any syntax errors, but doesn't highlight any of the JavaScript, only the PHP.</p>
  
  <p>I know it's capable of doing this because I can name the file with a .php extension and surround all the code with <code>&lt;script&gt;</code> tags and everything highlights correctly. Unfortunately that would break my application.</p>
  
  <p>Does anyone know of a way I can get highlighting to work for both languages without <code>script</code> tags?</p>