print(json_encode($output));
Hello, the above statement in PHP might have the probability of printing null to my Android application.
How do I check whether the json is a null on my Android application?
Update: Since json_encode() method returns a "null" , you can check whether the response you get from executing the httppost/httpget whether it is a "null" before assigning it to a JSONArray. Note that PHP's actual null value when you load a page is empty while printing a null JSON_Encode is actually a "null" String. Therefore you would need to check ".equals("null") on your Android side rather than "== null"