It is also good to set the access security - just replace * with the domain you want to be able to reach it.
'1',
'value1'=> 'value1',
'value2'=> 'value2'
);
echo json_encode($response);
?>
Here is more samples on that: how to bypass Access-Control-Allow-Origin?