标签:直接 return pre strlen func UNC bsp for fun
function createOrderNumber($orderId) { $n = 8; //订单号年月日后位数 $len = strlen($orderId); $x = $n - $len; $str = ‘‘; if ($x > 0) { for ($i = 1; $i <= $x; $i++) { $str .= ‘0‘; } } return date(‘Ymd‘) . $str . $orderId; }
标签:直接 return pre strlen func UNC bsp for fun
原文地址:https://www.cnblogs.com/zlicon/p/9223836.html