如题所述
第1个回答 2017-08-10
var i = 0;
<?php foreach ($resultSet as $key => $value) { ?>
series.push({
name: '<?php echo $value["name"] . $value["name"]; ?>',
type: 'line',
tiled: '总量',
data: [
<?php echo $value["name"]; ?>,<?php echo $value["name"]; ?>,
<?php echo $value["name"]; ?>,<?php echo $value["name"]; ?>
]
});
legend[i] = '<?php echo $value["name"]; ?>';
i++;
<?php } ?>
<?php foreach ($resultSet as $key => $value) { ?>
series.push({
name: '<?php echo $value["name"] . $value["name"]; ?>',
type: 'line',
tiled: '总量',
data: [
<?php echo $value["name"]; ?>,<?php echo $value["name"]; ?>,
<?php echo $value["name"]; ?>,<?php echo $value["name"]; ?>
]
});
legend[i] = '<?php echo $value["name"]; ?>';
i++;
<?php } ?>
以上为php代码,FYI。