如何在替换繁琐的括号标签时输出结果?
而不是 [3] => 56531631380
我想要@56531631380& 用于所有项目
<?php
$f = fopen ('http://fanpagelist.com/category/top_users/view/list/sort/fans/page1', 'r');
$page = '';
while ($line = fgets($f)) {
$page .= $line;
}
fclose ($f);
preg_match_all('#(?:(?<=\bhref="/like_box\.php\?id=)|' .
'(?<=\bsrc="https://graph\.facebook\.com/))\d+#i',
$page, $result, PREG_PATTERN_ORDER);
print_r ($result);
?>
<pre>
<?php
echo preg_replace("/\([^)]+\)/","",$result);
?>
</pre>