Php convert string to html format
I have a string Show
How would I change this into I have tried a few things but no luck any help? Update
FIX
asked Nov 24, 2010 at 13:23
ValVal 17k22 gold badges94 silver badges144 bronze badges 0 The function for that is
Note that for the function to decode quotes, you need to specify the answered Nov 24, 2010 at 13:24
PekkaPekka 434k137 gold badges964 silver badges1077 bronze badges 18 answered Nov 24, 2010 at 13:34
YeroonYeroon 3,2052 gold badges21 silver badges29 bronze badges
answered Nov 24, 2010 at 13:26
NapasNapas 2,6093 gold badges28 silver badges31 bronze badges 1 use this it's better ...
answered Dec 24, 2013 at 2:40
Conner 29.2k8 gold badges51 silver badges73 bronze badges answered Nov 24, 2010 at 13:24
PeeHaaPeeHaa 69.8k57 gold badges185 silver badges259 bronze badges Not the answer you're looking for? Browse other questions tagged php character or ask your own question.❮ PHP String Reference ExampleConvert HTML entities to characters: $str = '<a href="https://www.w3schools.com">w3schools.com</a>'; The HTML output of the code above will be (View Source): The browser output of the code above will be: Definition and UsageThe html_entity_decode() function converts HTML entities to characters. The html_entity_decode() function is the opposite of htmlentities(). Syntaxhtml_entity_decode(string,flags,character-set) Parameter Values
Technical Details
More ExamplesExampleConvert some HTML entities to characters: $str = "Albert Einstein said: 'E=MC²'"; The HTML output of the code above will be (View Source): Albert Einstein said: 'E=MC²' The browser output of the code above will be: Albert Einstein said: 'E=MC²' ExampleConvert some HTML entities to characters, using the Western European character-set: $str = "My name is Øyvind Åsane. I'm Norwegian."; The HTML output of the code above will be (View Source): My name is Øyvind Åsane. I'm Norwegian. The browser output of the code above will be: My name is Øyvind Åsane. I'm Norwegian. ❮ PHP String Reference How can I write HTML text in PHP? |