remove multiple spaces en line breaks

dorine@dpwebsites.nl 03 Oct, 2010
Can anyone tell me how i can strip multiple spaces and line breaks from a textarea before the data is stored?
When i export the table to csv textarea's get split into multiple rows where a user has entered a linebreak..😟
GreyHead 03 Oct, 2010
Hi htmlklus,

Try searching here on nl2br. The PHP function may be a solution

Bob
dorine@dpwebsites.nl 03 Oct, 2010
Hi Bob,

Thanks for your response but i don't want to turn the line breaks to <br> but i want to store the text without them.
So that

some text,

some more text



will be stored as

some text, some more text

GreyHead 03 Oct, 2010
Hi htmlklus,

Then probably a str_replace() or two in the OnSubmit before box will do the trick.

Bob
This topic is locked and no more replies can be posted.