สำหรับต้องการเลข Order Number หรือ เลขอื่นๆ ที่เป็นแบบสุ่มตามวันที่ครับ
<?php $today = date("Ymd");
$rand = strtoupper(substr(uniqid(sha1(time())), 0, 4));
$unique = $today . $rand;
?>
บันทึกความจำ //Web Developer //Graphic Design //IT
สำหรับต้องการเลข Order Number หรือ เลขอื่นๆ ที่เป็นแบบสุ่มตามวันที่ครับ
<?php $today = date("Ymd");
$rand = strtoupper(substr(uniqid(sha1(time())), 0, 4));
$unique = $today . $rand;
?>