偶昏倒
preg_match_all("/(-| |\:)([0-9])(-| |\:)/",$t[$j],$mm);
for($i=0;$i<count($mm[2])-1;$i++)
$mm[2]="0".$mm[2];是替换了
可是我怎么连接起来得到一个字符串呢?
preg_match_all("/(-| |\:)([0-9])(-| |\:)/",$t[$j],$mm);
for($i=0;$i<count($mm[2])-1;$i++)
$mm[2]="0".$mm[2];是替换了
可是我怎么连接起来得到一个字符串呢?
解决方案 »
- php获取客户端时间
- PHP前后台编码不同出现乱码
- 请问下各位 字母利用 26个英文来检索汉字 然后把查询的结果显示出在页面
- 麻烦大家给小弟一点php操作数据库的基础知资料好吗?
- 大部分的虚拟主机支持mysqli扩展吗》
- php 完成智能搜索功能,在线等
- 请问www.xxx.con/index?type=music这样的url该怎样写重写URL正则
- 求大神帮忙,CI访问restful问题
- 如何得到post数据的客户端IP 和端口?急!!!!
- 我想为公司,企业开发网站,现在有这方面的市场需求吗?
- pear和phplib之间是什么关系
- 如何实现vbb论坛那种的,在注册时,可以用IE的返回按钮,但网页填写的信息还存在??
preg_match_all("|<[^>]+>(.*)</[^>]+>|U", "<div align=left>a test</div>", $out, PREG_SET_ORDER);
print $out[0][0].", ".$out[0][1]."\n";
print $out[1][0].", ".$out[1][1]."\n"
?>传回值为 <b>example: </b>, example:
<div align=left>this is a test</div>, this is a test
$s = "2003-3-9 12:1:2";
echo preg_replace("/([- :])([0-9])([^0-9]?)/U","\\1 0\\2\\3",$s);
preg_replace("/([-: ])(\d)(?=\D|$)/e","'\\1'.'0'.'\\2'",$s)