// Get all custom fields for contacts $customFields = CRM_Core_BAO_CustomField::getFields('Contact');
// Get custom field with ID 123 $customField = CRM_Core_BAO_CustomField::getFields('Contact', ['id' => 123]); // Output the label of the custom field echo $customField[123]['label'];This code retrieves a single custom field with the ID of 123, and then outputs its label. The `getFields` function can also accept other parameters to filter or sort the results. Overall, the `CRM_Core_BAO_CustomField::getFields` function is a useful tool for working with custom fields in CiviCRM and belongs to the CiviCRM package library.