- var_dump: documentation ( source)
- json_decode: documentation ( source)
- urldecode: documentation ( source)
- print_r: documentation ( source)
- htmlentities: documentation ( source)
- htmlspecialchars: documentation ( source)
<?php
$data = '{"id":"51","name":"abc","address":"stffu fsagu asfhgui fsahgiu3#$@^^@#%^3 6\"\"wkgforqf\";rqgjrg..,,,rqwgtr\'\'qwrgtrw\'trwqt\'rqwtqwr trqt\n"}';
var_dump($data);
$string = htmlspecialchars($data, ENT_QUOTES);
$jsonFix = urldecode($string);
$string = htmlentities($jsonFix, ENT_QUOTES | ENT_IGNORE, "UTF-8");
$json = json_decode($string, true);
print_r($json);exit;