You are here

function _mailchimp_list_cmp in Mailchimp 7.5

Same name and namespace in other branches
  1. 8 mailchimp.module \_mailchimp_list_cmp()
  2. 7.2 mailchimp.module \_mailchimp_list_cmp()
  3. 7.3 mailchimp.module \_mailchimp_list_cmp()
  4. 7.4 mailchimp.module \_mailchimp_list_cmp()
  5. 2.x mailchimp.module \_mailchimp_list_cmp()

Helper function used by uasort() to sort lists alphabetically by name.

Parameters

array $a: An array representing the first list.

array $b: An array representing the second list.

Return value

int One of the values -1, 0, 1

1 string reference to '_mailchimp_list_cmp'
mailchimp_get_lists in ./mailchimp.module
Gets MailChimp lists/audiences. Can be filtered by an array of list IDs.

File

./mailchimp.module, line 504
Mailchimp module.

Code

function _mailchimp_list_cmp($a, $b) {
  if ($a->name == $b->name) {
    return 0;
  }
  return $a->name < $b->name ? -1 : 1;
}