php 正则取双引号内容
例如: $s='s:56:" <a href="cp.php?ac=task&taskid=7">领取每日积分大礼包 </a>"dfdfdfds';
变成
$s='" <a href="cp.php?ac=task&taskid=7">领取每日积分大礼包 </a>"'
没人在么?
PHP code:
$s=preg_replace('/".*"/','$1',$s);
PHP code:
$s=preg_replace('/(".*")/','$1',$s);
忘了加()
请问,你那个$s1是从那来的??
我的意思从:
's:56:" <a href="cp.php?ac=task&taskid=7">领取每日积分大礼包 </a>"dfdfdfds';
用正则得到
" <a href="cp.php?ac=task&taskid=7">领取每日积分大礼包 </a>"
PHP code:
$s=preg_replace('/^[^"]*\"|\"[^"]*$/','','s:56:" <a href="cp.php?ac=task&taskid=7">领取每日积分大礼包 </a>"dfdfdfds');
echo $s;
相关问答:
我们隶属中科院计算所网络重点实验室(http://www.ict.ac.cn/survey/channel/detail443.asp)基础设施课题组.
现因项目和业务拓展的需要,特需要招聘与项目相关的网络应用工程师1-2名。
具体要求如下。有意者 ......
$a = $_FILES['userfile']['name'] ;
$test = $a;
$p = split('/',$test);
$p[count($p)-1];
$content = file_get_contents("$p");
$con ......
webclient.php文件:
<?php
$arrOptions = array( 'uri'=>'http://10.10.19.111/','location'=>'http://10.10.19.111/webservice/webservice.php','trace' ......
PHP中title如何动态显示当前文章的标题?
在title中每篇文章都是显示同样的内容.想让他动态显示.不知道要如何写才能动态显示当前文章的标题呢?
谢谢
PHP中title?没明白,是不是HTML的title啊
如果是的话,你可以 ......