I\'m working on a project where I need to generate an undefined number of random, hexadecimal color codes…how would I go about building such a function in PHP?
you can use md5 for that purpose,very short
$color = substr(md5(rand()), 0, 6);