Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP - PDO return escaping slash, how to remove it?

Tags:

php

pdo

I am doing some select with PDO object, but after fetch result, I got string with escaped ' to \', how can I disable that?

like image 596
Rick Dust Avatar asked Aug 01 '10 14:08

Rick Dust


1 Answers

It seems like you might be having some trouble with Magic Quotes. You can disable them by following the instructions here. It's highly recommended that you disable them instead of sidestepping them by using a function to just strip the slashes out.

like image 200
Sam152 Avatar answered Sep 21 '22 22:09

Sam152