您好我已经创建了一个php文件供用户在我的网站上发表评论
$comment = $get_row[2];
$jsonarray = array('User' => $get_row[1],'Comments' => $comment, 'Post' => $get_row[3],'Date' => $get_row[4],'Like' => $get_row[5],'Dislike'=>$get_row[6],'islike' => $is_like,'abuse' => $get_row[7]);
但在评论框中输入“”“显示为
"""
;
是否有任何功能在PHP中解码此字符串,它显示为原始用户输入字符串,如“”“
答案 0 :(得分:0)
http://www.php.net/manual/en/function.htmlspecialchars-decode.php
<?
$x = '"with quotes" "';
print htmlspecialchars_decode($x);
?>
> php test.php
"with quotes" "