Answers for "generate random numbers and store in asn array php"

PHP
3

php get random value from array

$colors=["red","blue","green","orange"];
echo $colors[array_rand($colors)];//green (or any color randomly)
Posted by: Guest on June-02-2021

Code answers related to "generate random numbers and store in asn array php"

Browse Popular Code Answers by Language