I make some AJAX (PHP + JQuery), but I have one problem. I have: dataType:"json",
Everything works fine when json_encode returning some records from DB. The problem is what to do, how to say server in case that there are not any records?
When I have an array which is encoded to JSON is ok. WHen array is empty the json_enocde returning NULL. But this is not in expected format so I can't catch this error.
Hope, question is clear :)