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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -