Answers for "php get random array element from array list"

PHP
4

choose a random word from an array php

$items = array(1, 2, 3, 4, 5);
echo $items[array_rand($items)];
Posted by: Guest on June-27-2020

Code answers related to "php get random array element from array list"

Browse Popular Code Answers by Language