note 42375 added to function.chr
| From: | tippy2k at rn2 dot php dot net | Date: | Thu, 13 May 2004 23:27:56 +0000 |
| Subject: | note 42375 added to function.chr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69586@lists.php.net to get a copy of this message | ||
Working on the same thing as jmartin today. 701 is the limit of the script, 'ZZ'. This
should work a little faster. Hope it helps.
<?
function SSkey($xkey+1) {
$prefix = chr(floor($xkey+1 / 26)+64);
if($prefix == chr(64)) unset($prefix);
$suffix = chr($xkey+1 - (floor($xkey+1 / 26)*26) +64);
if($suffix == chr(64)) {
$prefix = chr( ord($prefix) -1);
if($prefix == chr(64)) unset($prefix);
$suffix = 'Z';
}
$sskey = "$prefix$suffix";
return $sskey;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.chr.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42375
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42375&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42375&report=yes
Search -- http://master.php.net/manage/user-notes.php