How to Generate String Unique Number Using MD5 and Unique ID in PHP

How to Generate String Unique Number in PHP

In php have a unique id function to generate unique id, but this system can’t given proper result all time

. This is my personal observation. If you use md5 and unique id both hopefully you overcome this situation.


md5 (uniqid());


Another way use random value to make unique id actually unique.


uniqid (rand (1,10000));

First option i preferer more.

I hope you get solution. Happy coding.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Khejur Gur