SoFunction
Updated on 2025-03-09

How to prevent single quotes and double quotes from being escaped on page under php

If you do not want the following to occur in the PHP page:

Single quotes are escaped as \'

Double quotes are escaped as \"

Then the following settings can be made to prevent:

Method 1: Set in: magic_quotes_gpc = Off

Method 2: $str=strpcslashes($str)