Hello I hope someone could help me cus Iam little bit confused about task I have to do in PHP
I need php file that is unique registration ID with these parameters:
First is AA00001 and next one is DF00002.
So first letter + 3 and second + 5, but numbers going in +1 order.
Could someone give me hint how to achieve this?
Thank you!
You can use substr to split the ID, dechex and hexdec to convert to/from decimal to hexadecimal, which gives you the A+3=D part, and you can use str_pad to front pad the integer with zeros, which gives you the second part, and then you just concatenate them.
ETA: Something like this:
ETA2: Unless you meant to go AA00001, DF00002, GK00003, JP00004, MU00005, PZ00006, SE00007 etc in which case you need