Answers for "Random selection of arrays of an object in php"

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
0

laravel random value from array

$k = array_rand($array);
$v = $array[$k];
Posted by: Guest on January-13-2021

Code answers related to "Random selection of arrays of an object in php"

Browse Popular Code Answers by Language