请教各位大神改版后的四六级总分怎么用正则表达式获取(旧版的我会获取) 正则表达式四六级php正则 td 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $a =<<< TXT<table border="0" align="center" cellpadding="0" cellspacing="6" class="cetTable"> <tr> <th>姓名:</th> <td>赵阳</td> </tr> <tr> <th>学校:</th> <td>长春中医药大学</td> </tr> <tr> <th>考试类别:</th> <td>英语四级</td> </tr> <tr> <th>准考证号:</th> <td>220090132112529</td> </tr> <tr> <th>考试时间:</th> <td>2013年12月</td> </tr> <tr> <th valign="top">总分:</th> <td valign="top" class="fontBold"> <span class="colorRed"> 0 </span> <br /><span class="color666">听力:</span> 000 <br /><span class="color666">阅读:</span> 000 <br /><span class="color666">写作与翻译:</span> 000 </td> </tr></table>TXT;$match="#<t[hd].*?>(.*?)</t[hd]>#is";preg_match_all($match,$a,$b);$b[1][11] = preg_replace('/\s/', '', strip_tags($b[1][11]));print_r($b[1]);Array( [0] => 姓名: [1] => 赵阳 [2] => 学校: [3] => 长春中医药大学 [4] => 考试类别: [5] => 英语四级 [6] => 准考证号: [7] => 220090132112529 [8] => 考试时间: [9] => 2013年12月 [10] => 总分: [11] => 0听力:000阅读:000写作与翻译:000) 现在有个问题最后一行?>报错我把你这个$match="#<t[hd].*?\>(.*?)</t[hd]>#is";转义了还是报错 为什么phpinfo()输出的环境变量PATH值,和我本机设置的不一样呢??? 购物车类设计 为什么我的WAMP不能打开某些php文件了 php搭建环境时,php必须放在c盘吗? mysql的问题 一段PHP代码,如何完成像表单提交一样的过程来操作数据库?请老师指点,谢谢! 过年了,休息一下 如何实现论坛中实现类似QQ样的即时消息发送! 这种cookie问题你们有没有碰到?? 字符串的问题 thinkphp如何部署到BAE3.0 搜了很久,没解决 while 循环遇到的问题,恳请指教!
<table border="0" align="center" cellpadding="0" cellspacing="6" class="cetTable">
<tr>
<th>姓名:</th>
<td>赵阳</td>
</tr>
<tr>
<th>学校:</th>
<td>长春中医药大学</td>
</tr>
<tr>
<th>考试类别:</th>
<td>英语四级</td>
</tr>
<tr>
<th>准考证号:</th>
<td>220090132112529</td>
</tr>
<tr>
<th>考试时间:</th>
<td>2013年12月</td>
</tr>
<tr>
<th valign="top">总分:</th>
<td valign="top" class="fontBold">
<span class="colorRed">
0
</span>
<br /><span class="color666">听力:</span>
000
<br /><span class="color666">阅读:</span>
000
<br /><span class="color666">写作与翻译:</span>
000
</td>
</tr>
</table>
TXT;
$match="#<t[hd].*?>(.*?)</t[hd]>#is";
preg_match_all($match,$a,$b);
$b[1][11] = preg_replace('/\s/', '', strip_tags($b[1][11]));
print_r($b[1]);Array
(
[0] => 姓名:
[1] => 赵阳
[2] => 学校:
[3] => 长春中医药大学
[4] => 考试类别:
[5] => 英语四级
[6] => 准考证号:
[7] => 220090132112529
[8] => 考试时间:
[9] => 2013年12月
[10] => 总分:
[11] => 0听力:000阅读:000写作与翻译:000
)
我把你这个
$match="#<t[hd].*?\>(.*?)</t[hd]>#is";
转义了还是报错