addslashes and addcslahes
<p>I was seeing today the addslashes and addcslashes in php.net, but did not get the point on what is the difference between them and what are the characters escaped in these two.</p>

<pre><code>&lt;?php
  $originaltext = 'This text does NOT contain \\n a new-line!';
  $encoded = addcslashes($originaltext, '\\');
  $decoded = stripcslashes($encoded);
  //$decoded now contains a copy of $originaltext with perfect integrity
  echo $decoded; //Display the sentence with it's literal \n intact
?&gt;
</code></pre>

<p>If i comment the $decoded variable and echo $encoded, i get the same value which is in the original string. </p>

<p>Can anyone clearly explain me the difference and use of these two.</p>
