due to an issue i am facing with IE 8 , its not rendering some charts using Highcharts the issue that i am using the below code to extract my data from the database
the PHP code return the below
series: [{
type: 'pie',
data: [
['FirstRowItem',21],['SecondRowItem',10],['ThirdRowItem',6], ]
}]
and the DB request as the following
series: [{
type: 'pie',
data: [ <?php
while($row = mysql_fetch_array($getitemscount)){
echo "['";
echo $row['items'];
echo "',";
echo $row['item countt'];
echo "],";`}
?>
]
}]
it works fine on IE9, chrome, Firefox. but on IE8 because of the , by the end of ['ThirdRowItem',6], it doesnt work as it says undefined variable.
what i was thinking about if there is any piece of code that would just delete that last comma (the lazy way) or any other way to get the DB data without it?
Thank you in advance.
*********** EDIT ****************
a much better way HERE