I try to put scrapped html content and turn it into json. Below is my invalid output:
{
"item": {
"title": "Take a look back at 2014’s biggest series A funding rounds across Asia (INFOGRAPHIC)",
"desc": "Where's the money flowing for earlier stage startups? By narrowing down the playing field to A rounds, you can get an idea (hint: China and ecommerce).",
"link": "https://www.example.com/asia-biggest-series-a-rounds-2014/",
"content": "<p>2014 was a banner year for Asia’s startup ecosystem at large. The year saw some of the <a href=\\\"https://www.example.com/flipkart-wants-to-be-alibaba-with-1-billion-dollars/\\\">biggest tech investments</a> the region has ever seen, a <a href=\\\"https://www.example.com/alibaba-ipo-starts-93-dollars-per-share/\\\">blockbuster exit</a>, and the rise of <a href=\\\"https://www.example.com/rakuten-just-launched-a-100m-fund-for-startups-interview-saemin-ahn/\\\">Silicon Valley-level funds</a> by Asian investors.</p>
<p>Every country in Asia seems to have a flagship startup that dominates the headlines, but it’s difficult to compare the ecosystem at large against its star player (or players). To even the playing field and get a better idea of where the investment money is flowing, we dug into the <em>Tech in Asia</em> archives to nail down each country’s biggest series A round in 2014. By narrowing the field to series A funding exclusively, you can get an idea of where younger startups are getting the most support and what verticals are attracting the most VC attention.</p>
<p>Please note that the following data is for <em>disclosed</em> investments only. While some startups very well may have attracted larger sums, it’s left to pure speculation if the amount hasn’t been made public. If you’re aware of a larger A round for any of the nine countries listed – or for a country in Asia that didn’t make it on this list – please let us know in the comments section below.</p>
<p><img src=\\\"https://www-techinasia.netdna-ssl.com/wp-content/uploads/2015/01/Biggest-Series-A-Funding-Rounds-Across-Asia-in-2014-3.png\\\" alt=\\\"Biggest-Series-A-Funding-Rounds-Across-Asia-in-2014-3\\\" width=\\\"700\\\" height=\\\"3888\\\" class=\\\"aligncenter size-full wp-image-213973\\\" /></p>
<p><center><strong>See: <a href=\\\"https://www.example.com/crystal-ball-gazing-8-predictions-asias-startup-scene-2015/\\\">8 predictions for Asia’s startup scene in 2015</a></strong></center></p>
<p>This post <a href=\\\"https://www.example.com/asia-biggest-series-a-rounds-2014/\\\" title=\\\"Take a look back at 2014’s biggest series A funding rounds across Asia (INFOGRAPHIC)\\\">Take a look back at 2014’s biggest series A funding rounds across Asia (INFOGRAPHIC)</a> appeared first on Tech in Asia.</p>"
}
}
This is what I've tried
$myArray["item"]["content"] = addcslashes($item_content,'"');
echo json_encode($myArray, true);
I also tried htmlentities() but doesn't work.