I am trying to create a quick object for working with a graph I am making.
This is what the output looks like:
[
['Firefox', 45.0],
['IE', 26.8],
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
My code / loop that I need to use to create this data:
$series = Array();
foreach($segmentData->segment as $segment){
echo $segment->segmentName . ' has ' . $segment->total . '<br />';
//Need to create the data here
}
json_encode?$seriesarray?