0
我在JavaScript本代碼表列:進口價值
$(function() {
$('#grafic_column').highcharts({
chart: {
type: 'column'
},
series: [{
name: 'Population',
data: [
['Shanghai', 23.7],
['Lagos', 16.1],
['Istanbul', 14.2]
]
}]
});
});
而這種鱈魚在PHP中:
<?php
$ar = array(
['Shanghai', 23.7],
['Lagos', 16.1],
['Istanbul', 14.2]
);
echo json_encode($ar);
?>
如何在series.data:
中導入來自php的值結果?謝謝!
是從你的PHP服務器所服務的JavaScript代碼? – alphaloop
@alphaloop,是 – ster
'data:[ <?php echo json_encode($ ar); ?> ]'? – Sherif