Jump to content

[SOLVED] Handling mid-line carriage returns in a flatfile database?


Schlo_50

Recommended Posts

Hello,

 

I'm using a flat file database and getting problems when carriage returns occur in the middle of lines. This happens, for example, when the text comes from a web form TEXTAREA field.

 

How can I strip and replace such carriage return characters with the word [break] and keep everything on one line/row?

 

The following code replaces \n with [break] but when I view the datebase everything is still on a new line  ???.

$input = str_replace("\n", "[break]", $_POST[$key]);

 

Any help with this would be great!

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.