Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove "\n"

Status
Not open for further replies.

kurkulis

IS-IT--Management
Jan 1, 2007
11
LV
i need to remove "/n" within the text, before html tags, for example text in source looks like this:
"<font size="7">
sdfsdfsfs</font>"

but i need this source text to be in one line:
"<font size="7">sdfsdfsfs</font>"

this is need for one JavaScript, otherwise its isnt working..
trim() is removing from the beginning and end of a string but not within it. What to do?
 
subst is easier on resources.

Code:
subst("\n\r","",$texttoremovefrom);

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top