I have a multidimensional array which is a combination of string and int value like this
Array ( [0] => Array ( [0] => 2,2 ) [1] => Array ( [0] => 2,59 ) )
I need to make this array become like this
[['2', 2],['2', 59]]
I using json_encode but it return
[["2,2"],["2,59"]]
I'm using this array for chart
I read from http://php.net/manual/en/function.json-encode.php but no one from json_ecode list can return like that
can someone help me? thx
can you help me once again,
$data = new stdClass();
$data->name = 'SD';
$data->data = $totalSD;
$data2 = new stdClass();
$data2->name = 'SMP';
$data2->data = $totalSMP;
$list = array();
array_push($list, $data);
array_push($list, $data2);
I Have array like this
$a =[{"name":"SD","data":[0,0,0,0,0,0,0,0,0,0,0,0,0,17,2]},{"name":"SMP","data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}];
I need to change the array to become like this
$a =[{name:'SD',data:[0,0,0,0,0,0,0,0,0,0,0,0,0,17,2]},{name:'SMP',data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}];