dcarbone/php-int-to-alpha

A lib that take a base 10 integer and turns it into a base 26 alphabet string

1.0.0 2016-03-10 22:40 UTC

This package is auto-updated.

Last update: 2024-12-17 09:58:36 UTC


README

A lib that take a base 10 integer and turns it into a base 26 alphabet string

Thanks to:

The logic contained within this lib was inspired by this post: http://www.geeksforgeeks.org/find-excel-column-name-given-number/

Installation

This lib requires the use of Composer

Require entry:

    "dcarbone/php-int-to-alpha": "1.0.*"

Usage

$alpha = \DCarbone\IntToAlpha::invoke($integer);
echo $alpha;

// OR

$intToAlpha = new \DCarbone\IntToAlpha();

$alpha = $intToAlpha($integer);