Created
December 7, 2010 17:13
-
-
Save fabeat/732078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$arr = array('foo ', ' bar '); | |
$arr = array_map(function($el){ return trim($el); }, $arr); | |
var_dump($arr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array(2) { | |
[0]=> | |
string(3) "foo" | |
[1]=> | |
string(3) "bar" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment