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

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

jQuery Ajax Render Fragments OR Whole Page -

java - Why is BlockingQueue.take() not releasing the thread? -