tosicky Posted October 15, 2010 Share Posted October 15, 2010 Please i'm working on a project and i need to write a code that generates a unique random serial number.How can i go about it? Link to comment https://forums.phpfreaks.com/topic/215905-code-for-generating-random-serial-number/ Share on other sites More sharing options...
ZachMEdwards Posted October 15, 2010 Share Posted October 15, 2010 What format do you want your serial number to be in? rand() Link to comment https://forums.phpfreaks.com/topic/215905-code-for-generating-random-serial-number/#findComment-1122367 Share on other sites More sharing options...
turkman Posted October 15, 2010 Share Posted October 15, 2010 easyway $randomNumber = rand(1111111,9999999); random number between 1111111 and 99999999 its about a 50 million to 1 shot of the same number being generated twice. Link to comment https://forums.phpfreaks.com/topic/215905-code-for-generating-random-serial-number/#findComment-1122450 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.