Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

codegreper

Get random element from array in php

$arrays = ['one', 'two', 'three', 'four'];
echo $arrays[random_int(0, 3)];
 
PREVIOUS NEXT
Tagged: #codegreper
ADD COMMENT
Topic
Name
7+1 =