public function show(){
$con = file_get_contents("网址");
$preg="正则";
preg_match_all($preg,$con,$arr);
foreach($arr[1] as $id=>$row){
echo "".$arr[1][$id]."";
}
$this->display();
}这是后台代码,这样前台SHOW页面不用插入任何代码就可以显示循环内容public function show(){
$con = file_get_contents("网址");
$preg="正则";
preg_match_all($preg,$con,$arr);
foreach($arr[1] as $id=>$row){
$xxx="".$arr[1][$id]."";
}
$this->display();
}而这样的话,我前台{$xxx}标签调用,只显示循环的第一条记录,,我在前台页面用<php>代码</php>也是不行、、
请问怎么才能用标签显示循环出来的内容啊??多谢
最佳答案