$input = [
['id' => 41132],
['id' => 41132],
['id' => 35777],
['id' => 41132],
['id' => 41132],
['id' => 35777],
];
$uniqIds = [];
foreach ($input as $item) {
$uniqIds[$item['id']] = null;
}
$uniqIds = implode(', ', array_keys($uniqIds));
var_dump($uniqIds); // string(12) "41132, 35777"