I think the code is obvious:
foreach ($programs as $program) {
if ($program->name == 'foo') {
unset($program);
}
}
But it's not working!
Isn't it possible to unset current property? Where's the problem? Is there any alternatives?