note 95515 added to function.chr
| From: | moloth at hotmail dot com | Date: | Thu, 07 Jan 2010 05:13:27 +0000 |
| Subject: | note 95515 added to function.chr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164719@lists.php.net to get a copy of this message | ||
This is fixing the problem alphabet numbering system below:
<?php
//Recursive Function to do letter numbering with standard arrays
// 0=A 25=Z 26=AA 701=ZZ 702=AAA
function IntToAlpha($i) {
$imod = $i%26;
$idiv = floor($i/26);
$alpha_string=chr($imod+65);
return ($idiv>=1 ? (IntToAlpha($idiv-1)).$alpha_string : $alpha_string);
}
?>
----
Server IP: 117.55.229.1
Probable Submitter: 58.173.181.120
----
Manual Page -- http://www.php.net/manual/en/function.chr.php
Edit -- https://master.php.net/note/edit/95515
Del: integrated -- https://master.php.net/note/delete/95515/integrated
Del: useless -- https://master.php.net/note/delete/95515/useless
Del: bad code -- https://master.php.net/note/delete/95515/bad+code
Del: spam -- https://master.php.net/note/delete/95515/spam
Del: non-english -- https://master.php.net/note/delete/95515/non-english
Del: in docs -- https://master.php.net/note/delete/95515/in+docs
Del: other reasons-- https://master.php.net/note/delete/95515
Reject -- https://master.php.net/note/reject/95515
Search -- https://master.php.net/manage/user-notes.php