How to create 7 or Nth digits alphanumeric coupon code in a fast way? I have checked to use array_rand
or rand
or mt_rand
which function should I prefer. To make my code fast and get more random number.
Requirement:
It should be take random number from 0-9 and A-Z (not lowercase a-z).
Starting first to three characters should be from A-Z and remaining should be 0-9.
0-9 and A-Z can be repeat.