I have a json_encoded array that comes out like this


I need it to come out without the quotes surrounding the y and the customTooltip and singlequotes around the last value like this


Is this possible or should I find another approach?
I derive the array like this:

while ($row = mysql_fetch_assoc($result)) {
        $data1[] = array(
                         'y' => $row['FORSTA'],
                         'customTooltip' => $row['ANDRA']
echo json_encode(($data1), JSON_NUMERIC_CHECK);


Ok, this didn't need to be formattad with json, I solved it like this:

$op99 .= "\n\t{y:{$row['FORSTA']}, customTooltip:'{$row['ANDRA']}'},";


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.