As I understand, stripslashes should not remove slash from newline character “\n”. And all works fine, excepts situation, when I have a newline character in a variable.
$string = '\n\"';
echo stripslashes($string); // n"
But I need in the next output: \n".
Thank you in advance.
I think you are mixing double and simple quotes
Using single quote there is no escapement(appart ‘) also in single quote PHP won’t replace PHP variables.
On the other hand the double quote permits using escaped sequence such as
\n,\tetc…You can review the documentation and check the differences.
So you meant to write