|
PHP5中文手册
trim(PHP 4, PHP 5) trim — Strip whitespace (or other characters) from the beginning and end of a string 说明
string trim
( string $str
[, string $charlist
] )
This function returns a string with whitespace stripped from the beginning and end of str . Without the second parameter, trim() will strip these characters:
参数
返回值The trimmed string. 更新日志
范例
Example#1 Usage example of trim()
<?php 上例将输出:
Example#2 Trimming array values with trim()
<?php 上例将输出:
|