How to find if an object is empty or not in PHP.
Following is the code in which $obj is holding XML data. How can I check if it\'s empty or not?
$obj
I was using a json_decode of a string in post request. None of the above worked for me, in the end I used this:
$post_vals = json_decode($_POST['stuff']); if(json_encode($post_vals->object) != '{}') { // its not empty }