php - How can I trim all strings in an Array? -
this question has answer here:
if have array:
array(" hey ", "bla ", " test");
and want trim of them, how can that?
the array after trim:
array("hey", "bla", "test");
array_map() need:
$result = array_map('trim', $source_array);
Comments
Post a Comment