php trim array values code example
Example 1: php trim all array elements
$result = array_map('trim', $source_array);
Example 2: trim elements of array php
$arr = array( " John ", "Jacob ", " Tom ", " Tim ");
$result = array_map('trim', $arr)
$result = array_map('trim', $source_array);
$arr = array( " John ", "Jacob ", " Tom ", " Tim ");
$result = array_map('trim', $arr)