how to use json data from ajax response in php script using jquery code example Example: php json response to ajax <?php echo json_encode($data); ?>