开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜