Trimming array values
I know var_dump($array) trims the array content & print it开发者_JAVA技巧. but I want to skip the print part. What should I do? Should I use some other function
Use array_map
with trim
$trimmed = array_map('trim', $array);
You might find something here: http://php.net/manual/en/function.trim.php
精彩评论