How to properly return html from an ajax call? Im currently returning html inside json but is there a better way to handle this? How to handle errors and missing arguments for example. Should an ajax request return always JSON?
<?=json_encode(array('html' => $res))?>