My app saves tweets into mysql. But the contents of '$status->content' i.e. tweet message are not saved as they appear if outputted. Other values like '?->author->name' and '?->id' are saved as they appear. This is how a tweet msg i.e. '$status->content' look like when I display tables results;
<a href="http://search.twitter.com/search?q=%23DIYse_D" onclick="pageTra
cker._setCustomVar(2, 'result_type', 'recent', 3);pageTracker._trackPageview('/i
ntra/hashtag/#DIYse_D');"><b>#DIYse_D</b></a> D
The results are returned as xml object from my php function & I fetch value开发者_JS百科s of these properties from it.
It's most likely because there is HTML (with a page tracker) in the content. If you look at the original results source, you can see that "status" has a type of "html".
Use:
$clean_content = strip_tags($status->content);
To remove HTML tags and obtain only the text.
精彩评论