Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get random value from array

$colors=["red","blue","green","orange"];
echo $colors[array_rand($colors)];//green (or any color randomly)
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #random #array
ADD COMMENT
Topic
Name
9+8 =