I am working with tracking API and this is my php function
$speedaf_tracking = $response['billCode'];
$speedaf_labels[] = $speedaf_tracking;
$print_labels = implode(',', $speedaf_labels);
$print_parameters = [
"waybillNoList" => [$print_labels],
"labelType" => 6
];
print_r ($print_parameters);
It give the print_r response:
Array ( [waybillNoList] => Array ( [0] => 'PK020001059806','PK020001059911' ) [labelType] => 6 )
But I want print_r should display like:
Array ( [waybillNoList] => Array ( [0] => PK020001059806 [1] => PK020001059911 ) [labelType] => 6 )
Please help
I would use explode, and not implode:
output: