I need to invent my own conversion function because of some encoding issue.
I decided that for now I will create a conversion table for my characters.
I want to know how I can possibly do an operation like the following C code to print out characters ‘a’ to ‘z’:
char a='a';
for(i=0;i<26;i++){
printf("%c",a);
}
How can I do that (incrementing characters value by value) in PHP ?
Variables containing characters can be incremented in PHP exactly as in C:
Additionally, PHP allows incrementing of strings:
You can also use
range:Finally, you can convert between character and numeric ASCII index via
chrandord. respectively.