You are here

function _mailchimp_list_cmp in Mailchimp 7.3

Same name and namespace in other branches
  1. 8 mailchimp.module \_mailchimp_list_cmp()
  2. 7.5 mailchimp.module \_mailchimp_list_cmp()
  3. 7.2 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
Return all MailChimp lists for a given key. Lists are stored in the cache.

File

./mailchimp.module, line 229
Mailchimp module.

Code

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