how to return json response and html both to ajax jquery code example Example: php json response to ajax <?php echo json_encode($data); ?>