accept array post values

trim() causes an error when $value is an array input field.