...

View Full Version : Forcing wordwrap() to ignore HTML tags



[vengeance]
10-11-2009, 05:02 PM
Hello.

Yesterday I received help regarding the functino wordwrap(). It's good but after a bit I noticed it wraps HTML tags too.

Like, I have a long sentence which includes <b></b>, some font color styling etc. and it gets messed up when it adds in a space between. (I.e. </f ont>, < /b> etc.)

Then I researched it a bit and found some people posting their custom wordwrap function which ignores HTML tags, but apparently some letters are missing, when I output my string.

Does anyone have an idea of how I could do this?
Thanks


EDIT: I just found this: http://php.net/manual/en/function.wordwrap.php#89782
Apparently it works fine for me at this point, although there's a notice about an issue in the script.

Considering everything works as it should right now, my issue is resolved. But if anyone knows anything about it, please tell me.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum