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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I strip carraige returns from textfield raw data

Status
Not open for further replies.

dreamaz

Technical User
Dec 18, 2002
184
CA
Hi Everyone,

I would like to know how I can strip out all the carriage returns in my textfield data. I currently have a text field called FIELD1 which then posts to the same page into variable $_POST['FIELD1'] and would like to strip out all the carriage returns before i use explode and break it all into arrays

Any help is appreciated.

Thanks

dR
 
there is a str_replace() command to do this:

$string=str_replace("\r\n","",$stringtoreplace);

Known is handfull, Unknown is worldfull
 
no problem...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top