My code is as follows
foreach($location_total_n_4 as $u=> $v) {
$final_location_total_4 .= "[".$u.",".$v."],";
}
I'm sending these values as JSON.
echo json_encode(array("location"=>"$final_location_total_4" ));
Here's how my response
object looks:
{
"location": "[1407110400000,6641],[1407196800000,1566],[1407283200000,3614],"??
}
I'm creating graph on success with ajax.so I need it like this,
{
"location": [1407110400000,6641],[1407196800000,1566],[1407283200000,3614],
}
Can anyone help me to solve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…