Json输出与HTML编辑器数据PHP冲突


Json Output conflict with HTML editor data PHP

在我的数据库中有一些数据来自tinymce编辑器。如果我从某个网站复制一些数据然后粘贴到我的编辑器中并保存到数据库中那么它看起来就像

<p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><strong>Knife Rights is pleased to welcome Alan Gottlieb, Founder of the Second Amendment Foundation and Chairman of the Citizens Committee for the Right to Keep and Bear Arms, as the featured speaker at the Knife Rights Sharper Future&trade; Awards Breakfast at BLADE Show on Saturday, June 7th. Join us for an informative and stimulating start to your Saturday at BLADE Show.</strong></p>
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><strong><font color="#CC0000">Seating is Limited!</font></strong>&nbsp;<a style="color: #0000cc; text-decoration: none;" href="http://www.kniferights.org/index.php?option=com_content&amp;task=view&amp;id=106"><strong>Buy your Sharper Future&trade; Awards Breakfast tickets now!</strong></a>&nbsp;<strong><font color="#CC0000">Tickets will NOT be available at BLADE Show or at the door. Tickets are only available online from Knife Rights.</font></strong>&nbsp;<a style="color: #0000cc; text-decoration: none;" href="http://www.kniferights.org/index.php?option=com_content&amp;task=view&amp;id=106"><strong>Buy your tickets NOW!</strong></a></p>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px;">- See more at: http://www.kniferights.org/#sthash.X2uomQY9.dpuf</span></p>

现在当我想在JSON输出中显示我的数组时,IT显示错误

Parse error on line 1:
^
Expecting '{', '['

我的代码是

    $output = array(
                'status' => $status,
                'message' => $message,
                'result' => $info           
            );
echo json_encode($output);

尝试对单个变量进行编码:

  $output = array(
            'status' => $status,
            'message' => json_encode($message),
            'result' => $info           
        );

假设你的HTML在$message中