Hi there...I am looking for a way to count using letters and numbers together in php but using letters instead....I am looking for a function that can do this for me...
For example a number would count like this: X, Y, Z, 10,11,12 and so on....Basically I want something that can generate numbers like this 3X7ac2...I need the numbers to be generated in order because I have been doing it manually with my hands on my computer to give clients a code..The numbers must all come in order not randomly generated numbers. E.g a customer can have a number like 2v7sN7 and the next number I generate should be 2v7sN8.
I have been doing it manualy but I want to have my website do it in PHP without me doing this. I am tired of doing them all myself. Please help.
Please any assistance would be appreciated
thank you
php letter count
Moderator: General Moderators
Re: php letter count
If case-sensitivity is not required, you could use base_convert.
will output 2v7sn8
Code: Select all
$h = '2v7sN7';
echo base_convert(base_convert($h, 36, 10) + 1, 10, 36);