HOME BLOG PORTFOLIO PHOTO CONTACT Admin Login
generate validate json from php

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/

   Share on Facebook

Page views:640