PHP trim() 函数
来源:百度文库 编辑:神马文学网 时间:2024/04/29 10:05:10
PHP trim() 函数
PHP String 函数
定义和用法
trim() 函数从字符串的两端删除空白字符和其他预定义字符。
语法
trim(string,charlist)
- "\0" - NULL
- "\t" - tab
- "\n" - new line
- "\x0B" - 纵向列表符
- "\r" - 回车
- " " - 普通空白字符
例子
例子 1
";echo "With trim: " . trim($str)
;?>
输出:
Without trim: Hello World!With trim: Hello World!
HTML 源码:
Without trim: Hello World!
With trim: Hello World!
例子 2
";echo "With trim: " . trim($str)
;?>
输出:
Without trim: Hello World!With trim: Hello World!
HTML 源码:
Without trim:Hello World!
With trim: Hello World!
PHP trim() 函数
javascript中trim函数的实现
PHP MySQL 函数
PHP 函数(Functions)
php 函数传值,传址,函数参数
php的几个配置文件函数
PHP通用检测函数集合
PHP的Socket函数参考
PHP 拼音反查函数
PHP通用检测函数集合
php中 被遗忘的函数
PHP的日期时间函数date()
php中 被遗忘的函数
PHP 常用字符串内部函数 string functions
PHP 常用数组内部函数 (Array Functions)
用 PHP 内置函数 file_put_contents 写入文件
用 PHP 内置函数 fwrite 写入文件
PHP错误处理的函数和相关信息
吐水奉献 ——PHP常用函数
PHP中图形函数imagettfbbox的坐标系统
PHP缓存技术:memcache函数详解之三 | Drupal爱好者
一个类似操作系统任务计划的php函数
PHP错误处理的函数和相关信息
PHP 常用数学计算内部函数 (Mathematical Functions)