$arr1 = array(); // Empty array $arr2 = array('apple', 'banana', 'orange'); // Non-empty array // Checking if $arr1 is empty if (CRM_Utils_Array::crmIsEmptyArray($arr1)){ echo "arr1 is empty"; } else { echo "arr1 is not empty"; } // Checking if $arr2 is empty if (CRM_Utils_Array::crmIsEmptyArray($arr2)){ echo "arr2 is empty"; } else { echo "arr2 is not empty"; }In the above example, the "crmIsEmptyArray" method is used to determine if $arr1 and $arr2 are empty or not. Package library: CiviCRM.