i was read this document document
they can loop from A to Z with this code.
$string = 'A';
for ( $i = 0; $i<=1; $i++ ) {
echo $string;
++$string;
}
and result can go from A to B or more than this up to $i
but!!
i can’t do loop from Z to A with this code
--$string;
Does anyone know how to loop from Z to A?
ps1. i can’t use range(); because ‘Z’ is in variable.
ps2. this is excel column that can go from A to Z, AA, AB or more then this.. so, i can’t use variable in range or number to character.
You can try
Output
If you must start with
Z