generat unique id in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Rahul, here is function that might help:

function generateRandomCode() {
$first_code = strtoupper(base_convert(rand(13330, 46655), 10, 36));
$second_code = rand(100, 999);
return $first_code . "-" . $second_code;
}


Regards

Adam

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux