我想从短语的开头和之后删除空格
$mystring = " Test Business Group Co.,Ltd ";

$mystring = "Test Business Group Co.,Ltd";
无论如何都要这样做?
答案 0 :(得分:0)
您可以使用trim()
函数从字符串的开头和结尾删除空格:http://php.net/manual/en/function.trim.php
$string = " hello world ";
$better_string = trim($string);
-> "hello world"