trim array in map php code example Example: trim array in map php $trimmed_array = array_map('trim', $fruit); print_r($trimmed_array);