xxxxxxxxxx
$response = [
'default1' => $default1,
'default2' => $default2
];
header('Content-Type: application/json');
echo json_encode($response);
xxxxxxxxxx
echo stripslashes('{\"test\":{\"test1\":{\"test1\":[{\"test2\":\"1\",\"test3\": \"foo\",\"test4\":\"bar\",\"test5\":\"test7\"}]}}}');