my Json
looks like this:
[{\"1332879360000.0\": 300.0, \"1332797760000.0\": 353.0,
\"1332799320000.0\": 358.0, \"1332
try this
}
// Set the JSON header
header("Content-type: text/json");
// The x value is the current JavaScript time, which is the Unix time multiplied by 1000.
$x = time() * 1000;
$y = rand(0,100) ;
mysql_query("INSERT INTO `apak`.`mach_1` (`id`, `temp`, `date_time`) VALUES (NULL,'".$y."', CURRENT_TIMESTAMP);") ;
// Create a PHP array and echo it as JSON
$ret = array($x, $y);
echo json_encode($ret);
?>
now the the highchart script
< /head>