我的HTML數據,如
Array([postedMsg] => <font color="blue">Blogger Wallpost</font>
[nbsp;<div_dir] => "ltr" style="text-align: left;" trbidi="on"><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-JrRECIxhi4s/TzpAs4lmgnI/AAAAAAAAAD4/KWcPpfXEGtU/s1600/800px-Cooked_Poha.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">image</a></div><div class="separator" style="clear: both; text-align: center;">Happy Blogger Wallpost</div><br></div><div class="blogger-post-footer">image src</div>
)
我嘗試使用類似的代碼
foreach($htmlpostedMsg AS $key => $value)
{
$htmlpostedMsg[$key] = $value;
}
print_r($htmlpostedMsg[$key]);
插入MySQL數據庫的$ _ POST整個價值
它打印只喜歡
\"ltr\" style=\"text-align: left;\" trbidi=\"on\"><div class=\"separator\" style=\"clear: both; text-align: center;\"></div><div class=\"separator\" style=\"clear: both; text-align: center;\"></div><div class=\"separator\" style=\"clear: both; text-align: center;\"></div><div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http://4.bp.blogspot.com/-JrRECIxhi4s/TzpAs4lmgnI/AAAAAAAAAD4/KWcPpfXEGtU/s1600/800px-Cooked_Poha.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\">image src</a></div><div class=\"separator\" style=\"clear: both; text-align: center;\">Happy Blogger Wallpost</div><br></div><div class=\"blogger-post-footer\">image src</div>\n
請正確格式化您的問題。目前這樣一團糟,我甚至不知道從哪裏開始編輯它。 – JJJ 2012-02-23 08:41:48
請格式化該代碼,以便我們有機會了解它。 – 2012-02-23 08:41:57
我試圖編輯您的文章,但無法弄清楚:所有這些樣式都是原始代碼中的,還是來自您複製的地方? (也許是一個格式化的HTML頁面)。請重新格式化您的代碼,因爲目前難以辨認 – 2012-02-23 08:43:43