$attr = 'field' . $key;
$myobject->$attr;

或者

$myobject->{'field_'.$key};