I'm using this code to bring a php var into a js function but I can't seem to get the proper formatting (output). I think highcharts needs numbers but it is creating a string even if I use "intval".
series: [{
name: 'Spyware',
data: [0, 3, 0, 0, 0]
}, {
name: 'Viruses',
data: [ <?php echo json_encode(intval($virusNum)); ?> , 0, 0, 0, 0]
}, {
name: 'Brute Force Attacks',
data: [0, 0, 0, 0, 0]
}, {
name: 'Host Sweeps',
data: [0, 0, 0, 0, 0]
}, {
name: 'Anonymizer/Proxy Server',
data: [0, 0, 0, 0, 0]
}]
Here's where I create the $virusNum variable.
$viruses[$aPos] = intval($freq);
$virusNum = $virusNum + $viruses[$aPos];
JSON.parsethejson_encodeed result.