我有这段代码来获取所有img标签:
<?php
foreach($design_children as $design_child) {
echo preg_match_all('/<img[^>]+>/i', $design_child->post_content, $result);
echo $result[0];
break;
}
?>
但我一直得到模式匹配号码返回 我的输出像我的图像旁边的2,3 我怎么删除它??? !!
答案 0 :(得分:0)
删除echo
之前的preg_match_all
。