title: amchart getting json data from mysql
body: <p>I try to make a chart with amcharts. But at the moment I have no success. This is how I generate my json file:</p>
  
  <pre><code>while ( $row = mysql_fetch_assoc( $result ) ) {
  echo $prefix . " {\n";
  echo '  "category": "' . $row['tstamp'] . '",' . "\n";
  
  echo '  "value": ' . $row['temp'] . '' . "\n";
  echo " }";
  $prefix = ",\n";
  }
  echo "\n]";
  </code></pre>
  
  <p>The html source code can be viewed here:
  <a href="http://bitfreun.de/werte.php" rel="nofollow noreferrer">http://bitfreun.de/werte.php</a></p>
  
  <p>In the Chrome console i get an error:
  <img src="https://i.stack.imgur.com/18oSu.png" alt="Chrome error message in developer console"></p>