note 95500 added to function.chr

From: Date: Wed, 06 Jan 2010 15:05:53 +0000
Subject: note 95500 added to function.chr
Groups: php.notes 
Request: Send a blank email to php-notes+get-164683@lists.php.net to get a copy of this message
<?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); } //Test it for ($x=700;$x<900;$x++) { echo "$x - ".IntToAlpha($x)."<br>"; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 58.173.181.120 ---- Manual Page -- http://www.php.net/manual/en/function.chr.php Edit -- https://master.php.net/note/edit/95500 Del: integrated -- https://master.php.net/note/delete/95500/integrated Del: useless -- https://master.php.net/note/delete/95500/useless Del: bad code -- https://master.php.net/note/delete/95500/bad+code Del: spam -- https://master.php.net/note/delete/95500/spam Del: non-english -- https://master.php.net/note/delete/95500/non-english Del: in docs -- https://master.php.net/note/delete/95500/in+docs Del: other reasons-- https://master.php.net/note/delete/95500 Reject -- https://master.php.net/note/reject/95500 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164683) next »