 <p>You can simple use the function <code>stripslashes</code>. </p> <pre><code> stripslashes($string); </code></pre> <p>Have a look into the official <a href="http://ca3.php.net/manual/en/function.stripslashes.php" rel="nofollow">documentation</a></p> <pre><code> &lt;?php $str = "Is your name O\'reilly?"; // Outputs: Is your name O'reilly? echo stripslashes($str); ?&gt; </code></pre>