If I have an stdObject say, $a.
stdObject
$a
Sure there\'s no problem to assign a new property, $a,
$a->new_property = $
This code is working fine for me in a loop
$remove = array( "market_value", "sector_id" ); foreach($remove as $key){ unset($obj_name->$key); }