$colors=["red","blue","green","orange"]; echo $colors[array_rand($colors)];//green (or any color randomly)