Answers for "php array get random element"

PHP
1

random array php

$array = ["a", "b", "c"];
$random = $array[ Rand(0, count($array)-1) ];

echo $random; // a or b or c
Posted by: Guest on August-17-2021

Code answers related to "php array get random element"

Browse Popular Code Answers by Language