I have the following code which encodes json in php
$arr = array('htmlOutput' => $htmloput, 'no_rows' => 'blah');
echo json_encode($arr);
$htmloput contains html mark up.
For some reason, there is a lot of \r\n\t\t\t\t\t\t\t in the output. Also, do single quotes or double quotes in the markup cause any proples when you encode in JSON?
Those characters are text-representations of whitespace characters.
\ris carriage-return.\nis newline. And\tis tab. Quotes shouldn’t matter.Some others (from the string docs):