PHP 随机生成十六进制颜色代码
作者:互联网
function xmsb_randomColor() { $strList = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']; $finalColor = '#'; for($i = 0; $i < 6; $i ++) { $finalColor .= $strList[array_rand($strList)]; } return $finalColor; }
标签:function,十六进制,return,rand,finalColor,颜色代码,strList,PHP 来源: https://www.cnblogs.com/XiaoMingBlingBling/p/15200639.html