I have the following code which I have put together from different tutorial examples:
<?php
$stamp = date("Ymdhis");
$random_id_length = 6;
$rndid = crypt(uniqid(rand(),1));
$rndid = strip_tags(stripslashes($rndid));
$rndid = str_replace(".","",$rndid);
$rndid = strrev(str_replace("/","",$rndid));
$rndid = substr($rndid,0,$random_id_length);
$orderid = "$stamp-$rndid";
$orderid = str_replace(".", "", "$orderid");
echo($orderid);
?>
FIDDLE: http://phpfiddle.org/main/code/27d-qfw
I would like this to create a number; the current time, followed by a 6 digit random number.
For example: 20130710045730-954762
However at the moment the random digits also include letters.
For example: 20130710045730-Z3sVN2
How can I edit the code to just include numbers? Any help is appreciated.