User enters text into HTML form and text, with CRLFs, is passed via POST method to PHP script. I var_dump text but all CRLFs are stripped out. Why? How can I preserve CRLFs in the PHP string value?
Ok so the CR LFs -ARE- getting passed but var_dump doesn't display them. strpos finds the CR LFs in the string.
When I paste the output from var_dump into a text editor it is a different length than what strlen says and the CR LFs seem to be gone. Strlen has a bigger length than the editor.
And how are you displaying the [tt]var_dump()[/tt]'s output ?
Is it displayed in a HTML page ? I guess, yes.
Is it displayed inside an element with [tt]white-space: pre[/tt] ( or just simply [tt]pre[/tt] tags ) ? I guess, no.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.