I have a form with a textarea in it. I log the results to a text file on the server, but I would like to strip out any line breaks a user would put in the textarea, as well as any commas that would interfere with importing the comma-delimited log text file into Excel or something for later use.
I think this has to do with regex, but I'm no expert and could use some help. Or maybe there is an easy PHP function that will do it?