How to remove from a UTF-8 string? [duplicate]
My database is returning some strings like: This is a string This is a problem when the string is long enough and you have maximum width set: <p style="width:50px">This is a string</p> In order to get ride of entities I've tried to use the following filters without success: $new = preg_replace("/ /i", " ", $str); $new = str_replace(' ', ' ', $str); $new = html_entity_decode($str); You have a PHP fiddle to see this in action (I've had to codify the string in hex from the database output; the string is in spanish, sorry). How to deal with this? Why
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.