Sharing some useful tips, solutions and notes for Geeks.

Thursday, November 2, 2017

Increment alphabets like numbers in php

Today i faced a situation to increment alphabet in a loop. So how did i achieved it?

Simple, code is provided below.

$xi = 'A';

Inside the loop, just echo this variable and then pre-increment it like below:


Voila :D

No comments: