Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
10-11-2009, 05:02 PM #1
- Join Date
- Aug 2009
- Thanked 7 Times in 7 Posts
Forcing wordwrap() to ignore HTML tags
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?
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.
Last edited by [vengeance]; 10-11-2009 at 05:10 PM.