PHP Add backslashes in front of special characters – PHP April 19, 2011 Pramod T P Leave a comment <?php $str = "Test's"; echo addslashes($str); //Test's ?>