You are here

function _tableofcontents_letter in Table of Contents 7.2

Same name and namespace in other branches
  1. 6.3 tableofcontents.pages.inc \_tableofcontents_letter()
  2. 7 tableofcontents.pages.inc \_tableofcontents_letter()

Transform a decimal number into a set of letters

1 call to _tableofcontents_letter()
_tableofcontents_convert_number in ./tableofcontents.themes.inc
Transform a decimal number in one of:

File

./tableofcontents.themes.inc, line 179
Table of Contents - Versatile system for generating Tables of Contents for fields - themes.

Code

function _tableofcontents_letter($number) {
  while ($number > 0) {
    $result = chr($number % 26 + 64) . $result;
    $number = (int) ($number / 26);
  }
  return $result;
}