What function can I use?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Keeping track of variable instances
- how to split a list into a given number of sub-lis
Checkout PHP Trim.
http://php.net/manual/en/function.trim.php would be your best choice
Use
trim
to remove whitespace at the start and end of a string.left most
right most
but shortcut of above two is simply
string trim ( string $str [, string $charlist ] )
This function returns a string with whitespace stripped from the beginning and end of str