Hi,
I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc....The container where i am displaying this is being dynamically generated using jquery.Any help?
Character increment
Moderator: General Moderators
Re: Character increment
Using PHP you can create an array to retrieve letters from:
Code: Select all
$letters = range('a', 'z');
...
foreach (range('a', 'z') as $letter) {
echo $letter;
}-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Character increment
Character increment seems to be flavour of the month
See this thread
See this thread
Re: Character increment
Hi ,
Great thanks for ur responses(mark and papa)..i found out a solution for that..
char = 'a';
print ++$char . PHP_EOL;
that would do the trickk.
Great thanks for ur responses(mark and papa)..i found out a solution for that..
char = 'a';
print ++$char . PHP_EOL;
that would do the trickk.
Re: Character increment
One more option to display characters
Code: Select all
For Uppercase A - Z
for($i=65;$i<=90;$i++)
{ echo chr($i); }
For Lowercase a - z
for($i=97;$i<=122;$i++)
{ echo chr($i); }