} // END - if
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',count()=' . count($GLOBALS['referral_refid'][$userid]));
+ // Sort the array reversed
+ krsort($GLOBALS['referral_refid']);
+
// Now walk through the array, first levels
foreach ($GLOBALS['referral_refid'][$userid] as $level => $levelArray) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',count()=' . count($levelArray));