generate validate json from php
$phrase = $description;
$search = array(“<p>”, “</p>”,”<br>”, “</br>”,”n”,”t”,”null”,”r”);
$replace = array(“”, “”,”", “”,”",”",”",”");
$newphrase = str_replace($search, $replace, $phrase);
$data.=”{“.’”image”:’.'”‘.$image.’”‘.”,”.’”title”:’.'”‘.$temp['title'].’”‘.”,”.
‘”description”:’.'”‘.$newphrase.’”‘.”}”.”,”;
Validation json http://paulisageek.com/json_validator/
or
http://zaach.github.com/jsonlint/