Announcement

Collapse
No announcement yet.

preserve text in html

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • preserve text in html

    Lets say I add this into a cell of my mysql database:

    Hello there

    hows it going
    and then I print out later, it will come out like this:

    Hello there hows it going
    Is there a way to make the page tell exactly what the cell contains

    thanks

    Dimava
    NXSupport Admin

  • #2
    Use nl2br():
    http://php.fastmirror.com/manual/en/function.nl2br.php
    As well as htmlspecialchars() if you want to have <br /> actually show up as <br />.
    Chen Avinadav
    Better to remain silent and be thought a fool than to speak out and remove all doubt.

    גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X