发布网友
共3个回答
热心网友
int preg_match ( string $pattern, string $subject [, array &$matches[, int $flags = 0[, int $offset = 0 ]]] )
preg_match()函数的第二个参数必须为字符串,目前还不支持数组形式的匹配。
可如下解决
$result = $this->result;
foreach($result as $s){
preg_match("/^Resource/i", $s)
}
热心网友
第二个参数要是字符串,楼主的代码
$this -> result
这里应该出错了
你可以试试
echo $this -> result;
看看是什么,应该是这里有问题
热心网友
那可能要把第二个参数转换成字符串了
可能用到循环
热心网友
int preg_match ( string $pattern, string $subject [, array &$matches[, int $flags = 0[, int $offset = 0 ]]] )
preg_match()函数的第二个参数必须为字符串,目前还不支持数组形式的匹配。
可如下解决
$result = $this->result;
foreach($result as $s){
preg_match("/^Resource/i", $s)
}
热心网友
那可能要把第二个参数转换成字符串了
可能用到循环
热心网友
第二个参数要是字符串,楼主的代码
$this -> result
这里应该出错了
你可以试试
echo $this -> result;
看看是什么,应该是这里有问题