if a =1, b=2,......, z=26 and then aa = 27 , ab =28 then What would be the value of ABC and Bb e.t.c in php

Please help me to make this program
I want to create a program in PHP so that we can find the dynamic value of the alphabet series such as = 1, b = 2 ..... z = 26 and then aa = 27, ab = 28 etc. What would be the value of ABC and Bb e.t.c