I have this in one of my scripts to take out line breaks:
$html=str_repla ce(array("\n"," \r"),"",$html );
Now I would like to leave some line breaks.
For example, if $html has something like this:
"<textarea> default text\n with line \nbreaks </textarea>"
I would like to leave all the linebreaks between the <textarea> tags.
Does any one know of a script, or a regular expression that can do this ?
$html=str_repla ce(array("\n"," \r"),"",$html );
Now I would like to leave some line breaks.
For example, if $html has something like this:
"<textarea> default text\n with line \nbreaks </textarea>"
I would like to leave all the linebreaks between the <textarea> tags.
Does any one know of a script, or a regular expression that can do this ?
Comment