PHP常用字符串函数
2013-10-24 10:35
417 查看
1:访问子字符串:strpos()
2:提取子字符串:substr()
3:逐字节处理字符串:strstr()
4:计算字符串长度:strlen()
5:替换子字符串:substr_replace()
6:按字节反转字符串:strrev()
7:按字反转字符串:
(1)首先将字符串分解为独立的字:explode()
(2)反转这个字数组:array_reverse()
(3)重建反转后的字符串:implode()
8:字符替换函数:str_replace()
9:第一个字母大写:ucfirst()
10:每个单词的首字母大写:ucwords()
11:整个字符串转小写:strtolower()
12:整个字符串转大写:strtoupper()
2:提取子字符串:substr()
3:逐字节处理字符串:strstr()
4:计算字符串长度:strlen()
5:替换子字符串:substr_replace()
6:按字节反转字符串:strrev()
7:按字反转字符串:
(1)首先将字符串分解为独立的字:explode()
(2)反转这个字数组:array_reverse()
(3)重建反转后的字符串:implode()
8:字符替换函数:str_replace()
9:第一个字母大写:ucfirst()
10:每个单词的首字母大写:ucwords()
11:整个字符串转小写:strtolower()
12:整个字符串转大写:strtoupper()
相关文章推荐
- PHP 预定义超全局数组/变量
- PHP之mysql笔记
- Error: A project with an Output Type of Class Library cannot be started directly
- 自动FTP脚本
- Yii连接mssql 数据库配置
- vsftp虚拟用户细则(转载)
- php学习点滴
- ByteArrayOutputStream和ByteArrayInputStream
- php 日期
- PHP __autoload()方法真的影响性能吗?
- PHP的cURL 快速入门
- PHP变量作用域
- php foreach用法和实例
- frame添加menu和添加contentpane的方法,放在一起
- php 修改、增加xml结点属性的实现代码
- php的fopen()函数
- 解决 FragmentPagerAdapter.notifyDataSetChanged() ...
- FTP协议完全详解
- 使用u-boot的tftp服务加载内核镜像同时挂载NFS
- 飞飞cms play.js解密play.php接口编写