* Im still a newbie to this so please go easy on me :) * Can someone fix and explain these for me? I can't really understand JSON since Im still new to it? Would really appreciate it very much. Thanks!
if ($result) {
  // creating an associative array to store the chart attributes        
  $arrData = array(
    $chart = array(
      $theme = "fint",
      $caption = "Browser Market Share",
      $subcaption = "February 2016",
      $captionFontSize = "24",
      $paletteColors = #A2A5FC, #41CBE3, #EEDA54, #BB423F #,F35685,
      $Font = "Quicksand, sans-serif",
      //more chart configuration options
    )
  );
  $arrData["data"] = array();
  // iterating over each data and pushing it into $arrData array
  while ($row = mysqli_fetch_array($result)) {
    array_push($arrData["data"], array(
      $label = $row["browser"],
      $value = $row["shareval"]
    ));
  }
  $jsonEncodedData = json_encode($arrData);
}
// Syntax for the instance -         
$var = new FusionCharts("type of chart", 
                "unique chart id", 
                "width of chart", 
                "height of chart", 
                "div id to render the chart", 
                "type of data", 
                "actual data")
// creating FusionCharts instance
$doughnutChart = new FusionCharts($doughnut2d, $browserShareChart , "100%", "450", "doughnut-chart", $json, $jsonEncodedData);
// FusionCharts render method
$doughnutChart=render();
// closing database connection      
$dbhandle=close();
?>
 
    