php adds backslash when printing quoted value but i dont want it to do that

184 Views Asked by At

In my database, there is a value something like that:

i haven't done it yet.

p.s: in the database the value is exactly the same here, there is no backslash.

When I print it php adds backslash before ' single quote.
get_magic_quotes_gpc is off. I dont understand why it is putting a backslash.

here is my php code to print value :

$_SESSION['foo'] = $_POST['foo'];
echo $_SESSION['foo'];
1

There are 1 best solutions below

6
On

Try this

echo stripslashes($value));