Answers for "php (array)array_rand"

PHP
2

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

Browse Popular Code Answers by Language