Assuming you decrypted JSON, yes, yes.
<?php
$json = '{"hello": ["world"], "goodbye": []}';
$decoded = json_decode($json);
print "Is hello empty? " . empty($decoded->{'hello'});
print "\n";
print "Is goodbye empty? " . empty($decoded->{'world'});
print "\n";
?>
gives:
Hi, is it empty?
Goodbye is empty? 1
source
share