In php, there are many ways to generate unique alphanumeric id. First of all, we will understand why we might need unique alphanumeric id in first place.
In applications, normally we use unique integer ids which is generally generated by database itself ~ Auto-increment, unique integers. But sometimes we need unique alphanumeric string as ids instead of simple integers.
Few Reasons:
In PHP, there is a very helpful function uniqid() which generates unique alphanumeric string for you. The function has two parameters ~ though both are optional -
#php