- array_map: documentation ( source)
- print_r: documentation ( source)
<?php
$in = [
[ 'id' => 352, 'name' => 'a' ],
[ 'id' => 438, 'name' => 'b' ],
[ 'id' => 351, 'name' => 'c' ],
];
$out = array_map(function ($arr) {
$arr['selected'] = null;
return $arr;
}, $in);
print_r($out);