array_map with trim() ?