This question already has an answer here:
If I have this array:
array(" hey ", "bla ", " test");
and I want to trim all of them, How can I do that?
The array after the trim:
array("hey", "bla", "test");
</div>
This question already has an answer here:
If I have this array:
array(" hey ", "bla ", " test");
and I want to trim all of them, How can I do that?
The array after the trim:
array("hey", "bla", "test");
</div>
array_map() is what you need:
$result = array_map('trim', $source_array);