You might want to search the docs on php.net for the function stripslashes(). And be sure to read the user comments too.
I use it just before I write the string/send it to the database. This way it's sure that other apps won't get disturbed by the slashes. And php reads it after that correct, ie. without slashes. They get appended when you have a special char in a var that is sent from/to a form (eg. through the 'post' or 'get' method. Use something like
$var = "This is a string with a 'quote'";
write (stripslashes($var));
Regards, hope it helps