I made a query with php and I'm iterating with my array using Foreach to set it to Highcharts
values as follows:
series: [<?php $i =0;
foreach($result as $rs) { ?>{
name: '<?php echo $rs['ConteudoNome'];?>',
data: [ <?php echo $rs['TreinoTempo']; ?>]
},<?php } ?>
And the result looks like this:
series: [{
name: 'Corrida',
data: [ 60]
},{
name: 'Ataque',
data: [ 51]
},{
name: 'Corrida',
data: [ 50]
},
]
I need the result to be something like "Run" [60,50]
that is, when ConteudoNome
is equal, it just adds value and does not create another string.