Mengubah objek array menjadi string dan memisahkan nilainya
Lets try this code :
$output = array_map(function ($object) { return $object->name; }, $input);
echo implode(‘, ‘, $output);
Lets try this code :
$output = array_map(function ($object) { return $object->name; }, $input);
echo implode(‘, ‘, $output);