What function can I use?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use trim
to remove whitespace at the start and end of a string.
回答2:
left most
ltrim('text');
right most
rtrim('text');
but shortcut of above two is simply
trim('text');
回答3:
string trim ( string $str [, string $charlist ] )
This function returns a string with whitespace stripped from the beginning and end of str
回答4:
http://php.net/manual/en/function.trim.php would be your best choice
回答5:
Checkout PHP Trim.