stripcslashes

addcslashes でクォートされた文字列をアンクォートする

説明

string stripcslashes(string $string)

バックスラッシュを取り除いた文字列を返します。C言語と同様に \n, \r ..., 8進表現, 16進表現を認識します。

パラメータ

string

元に戻したい文字列。

戻り値

元に戻した文字列を返します。

例1 stripcslashes の例

<?php

var_dump
(stripcslashes('I\'d have a coffee.\nNot a problem.') === "I'd have a coffee.
Not a problem."
); // true
?>

参考

  • addcslashes