Home > php教程 > php手册 > php生成随机颜色代码实例

php生成随机颜色代码实例

WBOY
Release: 2016-06-13 10:04:31
Original
1302 people have browsed it

本文章给各位同学介绍php生成随机颜色代码实例,有需要了解学习的朋友可参考。

 代码如下 复制代码
function randrgb() 

  $str='0123456789ABCDEF'; 
    $estr='#'; 
    $len=strlen($str); 
    for($i=1;$i     { 
        $num=rand(0,$len-1);   
        $estr=$estr.$str[$num];  
    } 
    return $estr; 
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template