开发者

using preg_replace after getting content from preg_match with regexp

I'm getting problems with my coding. I'm trying to take out tags from my preg_match_all. I'm still new and learning.

preg_match_all("/\<b>\\$(.*?)\<\/b\>/is", $res[0], $Price );
for($i = 0; $i < count($开发者_Python百科Price); $i++) {
    $Price = preg_replace("/<.*?>/is","",$Price);   

}
foreach($Price[0] as $kgbPrice) 
{
    $PriceArray[] = "<div class='prices' id='kgbdealsPrice'>".$Price."</div>";
}

The array is being outputted somewhere else.

I'm getting content which has

<b>content</b>

Thank you


SIMPLEHTMLDOM has been used by andrewliu for solving his problem. It was a much simpler solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜