<br/>标签在我的Twitter应用程序中无效

时间:2013-08-06 15:09:20

标签: php html twitter

我爬过亚伯拉罕的推特课,最后让我在我的网站上显示我的最后一条推文。现在我被重温为什么不识别
标签,因为它在firebug中显示为正确的html。这有什么常见的原因吗? http://liebdich.biz

PHP的相应行:

$tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser."&count=".$notweets); 
$text = $tweets[0] -> text;
echo $text;

谢谢!

1 个答案:

答案 0 :(得分:1)

Twitter传输标签字符的html实体。如果您真的希望PHP为您编写HTML,请尝试html_entity_decode

html_entity_decode("&lt;br&gt;");

给出:

<br>

有关详细信息,请参阅http://se1.php.net/function.html-entity-decode

请记住Twitter出于某种原因逃脱HTML。反转它需要您自担风险。

相关问题