PHP MySQL New Lines / Whitespaces from textarea
- by rob_robsen
I've a problem about whitespaces and new lines at the beginning of a textarea.
I send a json string with ajax to the php script.
Then I decode the string into an php array (with json_decode).
So I have a string in this array with two line breaks at the beginning.
If a print the text from the array, the line breaks are there, but if I store the text into the mysql database, the line breaks are gone...
Only at the beginning of the string, the line breaks gone... At the rest of the string, the line breaks are ok.
Thanks for your answers!
rob