【文件属性】:
文件名称:php经典实例
文件大小:8KB
文件格式:TXT
更新时间:2015-01-11 06:23:10
php 实例 字符 时间 文件
一、字符操作
1、访问子字符串:strpos();
if(strpos($_POST['email'],'@')==false){
echo 'the input content is not a legal email';
}
2、提取子字符串:substr();
$substring=substr($string,$start,$length);//$start从0开始,$length可以为负数(为空时表示到末尾)
3、替换子字符串:substr_replace();