WHERE ce.entity_table = 'civicrm_event' AND {$whereClause}";
$dao = CRM_Core_DAO::executeQuery($query);
- $results = array();
+ $results = [];
while ($dao->fetch()) {
- $results[] = array('id' => $dao->id, 'text' => $dao->label);
+ $results[] = ['id' => $dao->id, 'text' => $dao->label];
}
CRM_Utils_JSON::output($results);
}