php去除字符串左右空格

1 $str = "Hello World!";
2 echo $str . "<br>";
3 echo trim($str," ");

 

posted @ 2020-04-14 10:42  润土偷西瓜  阅读(1563)  评论(0编辑  收藏  举报