2012-01-23 17 views
-1

で配列に文字列を変換する:PHP - 私は、文字列持つエスケープ値

{"key": "<span style="text-decoration: underline;"><strong>dgdgg </strong></span>"} 

と配列に変換したい:

Array (
    ["key"]=> `<span style="text-decoration: underline;"><strong>dgdgg </strong></span>` 
) 

任意の提案を?

ありがとうございました。

答えて

2

何か?

$string = '{"key": "<span style=\"text-decoration: underline;\"><strong>dgdgg </strong></span>"}'; 
$string = json_decode($string, true); 
$string['key'] = htmlentities($string['key']); 
関連する問題