array_map() is your friend