<?php
$a = " abc ";
$b = trim($a);
var_dump($a);
var_dump($b);
?>
trim(string,charlist)
charlist可选。规定从字符串中删除哪些字符。如果省略该参数,则移除下列所有字符:
- " " - NULL
- " " - 制表符
- " " - 换行
- "x0B" - 垂直制表符
- " " - 回车
- " " - 空格
<?php
$a = " abc ";
$b = trim($a);
var_dump($a);
var_dump($b);
?>
trim(string,charlist)
charlist可选。规定从字符串中删除哪些字符。如果省略该参数,则移除下列所有字符: