在 PHP 中,可以使用 stripslashes() 函数去掉字符串中的转义字符。以下是一个示例:
$myString = "This is an example string with "escaped" characters.";
$myString = stripslashes($myString);
echo $myString;
输出结果:
This is an example string with "escaped" characters.
在上面的示例中,使用 stripslashes() 函数去掉了字符串中的单引号转义字符。