You are here: problem getting strip_tags to strip tags « All PHP « IT news, forums, messages
problem getting strip_tags to strip tags

Posted by Paul on 10/07/06 16:33

I have a string coming from a tinytext field in MySQL like:

<font
color="#000000">s<strike><b>ss<u>s<i>sss</i></u></b></strike><u>ss</u>sss<strike>sssssss</strike></font><font
color="#000000"><strike>ssss</strike>sssss</font>

I get that field in a mysql query and reference it like:

echo strip_tags($row[4]);
It renders the same line without stripping any tags:
<font
color="#000000">s<strike><b>ss<u>s<i>sss</i></u></b></strike><u>ss</u>sss<strike>sssssss</strike></font><font
color="#000000"><strike>ssss</strike>sssss</font>

I tried casting it as a string just to make sure, no difference.

If I take that string, assign it manually to a variable and strip-tags, it
works:
$v = '<font
color="#000000">s<strike><b>ss<u>s<i>sss</i></u></b></strike><u>ss</u>sss<strike>sssssss</strike></font><font
color="#000000"><strike>ssss</strike>sssss</font>';
echo strip_tags;
Any ideas how I can get it to propoerly strip tags from the database?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация