title: Javascript read from PHP
body: <p>I got this code</p>
  
  <pre><code>    var area = new Morris.Area({
      element: 'revenue-chart',
      resize: true,
      data: [
          {y: '2011 Q1', item1: 2666, item2: 2666},
          {y: '2011 Q2', item1: 2778, item2: 2294},
          {y: '2011 Q3', item1: 4912, item2: 1969},
          {y: '2011 Q4', item1: 3767, item2: 3597},
          {y: '2012 Q1', item1: 6810, item2: 1914},
          {y: '2012 Q2', item1: 5670, item2: 4293},
          {y: '2012 Q3', item1: 4820, item2: 3795},
          {y: '2012 Q4', item1: 15073, item2: 5967},
          {y: '2013 Q1', item1: 10687, item2: 4460},
          {y: '2013 Q2', item1: 8432, item2: 5713}
      ],
      xkey: 'y',
      ykeys: ['item1', 'item2'],
      labels: ['Item 1', 'Item 2'],
      lineColors: ['#a0d0e0', '#3c8dbc'],
      hideHover: 'auto'
  });
  </code></pre>
  
  <p>But i want it to be like this (I made a question for the date now i want to make a chart of the hits Link to question: <a href="https://stackoverflow.com/questions/27234713/php-cant-find-file-or-wrong-code">PHP Can&#39;t find file or wrong code</a>)</p>
  
  <pre><code>    var area = new Morris.Area({
      element: 'revenue-chart',
      resize: true,
      data: [
          {y: '2011 Q1', item1: &lt;?php echo file_get_contents("../adminpanel/pagecounters/totalviewsJanuari.txt ?&gt;, item2: 2666},
          {y: '2011 Q2', item1: Same Code but for febuari, item2: 2294},
          {y: '2011 Q3', item1: March, item2: 1969},
          {y: '2011 Q4', item1: April, item2: 3597},
          {y: '2012 Q1', item1: May, item2: 1914},
          {y: '2012 Q2', item1: June, item2: 4293},
          {y: '2012 Q3', item1: Jule, item2: 3795},
          {y: '2012 Q4', item1: August, item2: 5967},
          {y: '2013 Q1', item1: September, item2: 4460},
          {y: '2013 Q2', item1: November, item2: 5713}
          {y: '2013 Q2', item1: December, item2: 5713}
      ],
      xkey: 'y',
      ykeys: ['item1', 'item2'],
      labels: ['Item 1', 'Item 2'],
      lineColors: ['#a0d0e0', '#3c8dbc'],
      hideHover: 'auto'
  });
  </code></pre>
  
  <p>But it does not work, how do i make the Javascript read the file and is there a way without PHP?</p>