function _realname_sort in Real Name 6
Same name and namespace in other branches
- 5 realname.module \_realname_sort()
Provides array sorting function for uasort. @link http://us2.php.net/manual/en/function.uasort.php PHP Manual @end-link
Parameters
$a - the first array to be compared.:
$b - the second array to be compared.:
Return value
integer indicating ordering.
2 string references to '_realname_sort'
- realname_admin_fields in ./
realname.admin.inc - realname_admin_fields_submit in ./
realname.admin.inc - Form submit handler.
File
- ./
realname.module, line 940
Code
function _realname_sort($a, $b) {
// Sort first by weight.
$ret = $a['weight'] - $b['weight'];
if ($ret == 0) {
// The two are equal, so use the title.
$ret = strcmp($a['title'], $b['title']);
}
return $ret;
}