Hey, I am having this issue that I cannot seem to find a solution for. Basically I am storing information typed into a textfield in my database. The problem is that if you just holder enter in the text field creating a bunch of new lines, it will put all of that into the database. I have tried PHP's trim(), ltrim(), rtrim(), preg_replace() with a regex inside...none of them seem to solve this issue.
They do replace the whitespace if I type "sdf " for example, but not if I type,
"sdf
"
How can I trim all of that to just get "sdf" out of it? Thanks
They do replace the whitespace if I type "sdf " for example, but not if I type,
"sdf
"
How can I trim all of that to just get "sdf" out of it? Thanks
Comment