Forum Moderators: coopster

Message Too Old, No Replies

How can i wordwrap with htmlentities/utf8 strings

         

BlackDex

9:59 am on Nov 20, 2006 (gmt 0)

10+ Year Member



Hello there,

I need to use wordwrap a few strings because of the layout of the website.

Because this is user-input i need to convert the user string into a html viewable string, and therefor i use htmlentities().

Also, the string i get is an UTF8 string.
It seems that i can't use wordwrap() to wrap a continues utf8 string, or an already converted string with htmlentities().

Is there some way to use wordwrap on these kind of strings?

Thx in advance.

coopster

6:15 pm on Nov 20, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Use wordwrap prior to htmlentities. If that is not a possibility for some odd reason you could always html_entity_decode() [php.net] the string and then wordwrap and encode again.