Define frm in foreach.