This is a discussion on keeping html formatting in text within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi I've got some text coming out of a database, but html markup isn't being turned into formatting. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi
I've got some text coming out of a database, but html markup isn't being turned into formatting. For example, the text in the database is: Some men see things as they are and say, "Why?" I dream of things that never were and say, "Why not?" I'm using this code to output: $quote = HTMLSpecialChars($myrow[quote]); $quote = nl2br($quote); $quote = trim($quote); echo ("<b>\"$quote\"</b><br><i>$myrow[author]</i><br>"); and this is the output: "Some men see things as they are and say, "Why?" I dream of things that never were and say, "Why not?" " George Bernard Shaw [NB: note extra carriage return before the second quote marks. I'd sure like to kow where that's coming from too...] anyone any ideas? TIA Ian W |
![]() |
| Thread Tools | |
| Display Modes | |
|
|