Jump to content

remove<br /> from textarea


robert_gsfame

Recommended Posts

You need to filter your output before printing to the textarea. You need this to convert the <br /> tag to a newline:

<?php

function br2nl($string){

  $return=eregi_replace('<br[[:space:]]*/?'.

    '[[:space:]]*>',chr(13).chr(10),$string);

  return $return;

}

?>

Its a reverse function of nl2br. Once you filtered your output, then only you print to your textarea.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.