Hi all,

please take a look at this code:

echo "<textarea name='contentt' cols='75' rows='12' class='myform' warp='virtual'>".$contarr[$i]['content']."</textarea><BR><BR>\n";

everytime there is an enter key, '<Br />' shows up.

anyone know how to get rid or it?

tks in advance. (:
will

    Try this:

    echo "<textarea name='contentt' cols='75' rows='12' class='myform' wrap='virtual'>". striptags ($contarr[$i]['content']) . "</textarea><BR><BR>\n";

      I have this error:
      Fatal error: Call to undefined function: striptags()

      PallaviDalvi: yup.

        Clearly I've gone insane.

        It's strip_tags(...)

        That should do it.

          Just a question: you ever use [man]nl2br[/man] at all on that textarea's content?

            nl2br? yah, that's when i need multilines into the database, then i use it. that's y there's those <Br /> coming out. (:

              Then might I suggest that instead of using nl2br when the lines go into the database, use it instead after you've got the lines out of the database and you're about to display them.

              $string = "A rather boring string\nthat was stored in the database\nand is about to be displayed.";
              
              echo nl2br($string);
              

              Saves you having to go to the bother of repeatedly stripping the tags out only to have to put them back in again.

                Write a Reply...