具有相同元标记值PHP的多个标记

时间:2017-03-17 12:51:11

标签: php

$keywords = explode(',', $this->find_metatag_value('article:tag', $page_code));
        foreach ($keywords as $keyword)
        {
            $keyword = trim($keyword);
            if ($keyword != '')
            {
                $result->add_tag($keyword);
            }
        }

此代码正常运行但有多个标记 具有相同的元标记值。我想抓住所有标签

它只抓住第一篇文章:标签

自:

<meta property="article:tag" content="som text"/>
<meta property="article:tag" content="some text1"/>
<meta property="article:tag" content="latest text"/>
<meta property="article:tag" content="text line2"/>
<meta property="article:tag" content="some textdd"/>

0 个答案:

没有答案