Re: Letter incrementing
| From: | Brent Baisley | Date: | Thu, 18 Mar 2004 13:27:27 +0000 |
| Subject: | Re: Letter incrementing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180813@lists.php.net to get a copy of this message | ||
You want to use the char() function. What you need to do is increment an ascii value and then convert that value to a letter. So ascii 65 is A.
$asciiVal = 65;
echo char($asciiVal); A$asciiVal++; ... On Mar 18, 2004, at 8:16 AM, Brent Clark wrote:
Hi all Does anyone know how, or even if it is possible to increment a letter from the alphabet. I know that if you use e.g $o = 1; $o++; will result in $o == 2,. But I need to do a $variable = "B"; and then do a $variable++ that will result in $variable == "C" -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577