|
-
Aug 8th, 2002, 05:11 PM
#1
Thread Starter
Hyperactive Member
I get That php.net <pre>
Have you ever wanted to remove the '<br />' tags between
'<pre>' and '</pre>' tags after a call to nl2br()? I just
figured out how to do this and thought others would benefit.
$html = preg_replace(
"/(<pre>)([\w\W]*)(<\/pre>)/e",
"'\\1'.str_replace('<br />','','\\2').'\\3'",
$html);
___________
I want to do same with <textarea> .. I try this code
$html = preg_replace(
"/(<textarea>)([\w\W]*)(<\/textarea>)/e",
"'\\1'.str_replace('<br />','','\\2').'\\3'",
$html);
__________
but it does not work ... Why ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|