You are here: selective replacements « PHP Programming Language « IT news, forums, messages
selective replacements

Posted by meltedown on 11/11/05 04:09

I have this in one of my scripts to take out line breaks:
$html=str_replace(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 ?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация