Timeline for answer to php echo rich text from code in a mysql database by Pablo Cardozo
Current License: CC BY-SA 3.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 9, 2016 at 1:02 | comment | added | Pablo Cardozo | Oh, then you should just echo without any special function. But, where are you trying to echo this string? I mean, inside of a rich text editor or something like that? | |
| Jan 8, 2016 at 22:58 | comment | added | brett | It is storing the first way: CO<sub>2</sub> | |
| Jan 8, 2016 at 19:21 | comment | added | Pablo Cardozo | If you have the seccond one you can just use: html_entity_decode() | |
| Jan 8, 2016 at 19:20 | comment | added | Pablo Cardozo | Can you showme what is the data stored in your database? is: CO<sub>2</sub> or something like "CO<sub>2</sub>" ? | |
| Jan 8, 2016 at 19:04 | comment | added | brett | it looks like the echoing is fine when I check the echo, but my html5/javascript application front end is re-writing it as code again. Not sure how to fix this yet. If you have any ideas, that would be great. | |
| Jan 8, 2016 at 18:53 | comment | added | eggyal | @brett: CKEditor escapes HTML by default. | |
| Jan 8, 2016 at 18:45 | comment | added | brett | Hi Pablo, This is being inserted with a plugin: ckeditor so I don't know how to change the way it is entered, but it is entered as code. The problem I am having is that I want it to echo as formatted text, not code. | |
| Jan 8, 2016 at 18:06 | history | answered | Pablo Cardozo | CC BY-SA 3.0 |