Published
- 1 min read
array random php
The solution for this is noted below
array random php
Solution
<?php
$indexedArray = array("red", "blue", "green", "black");
echo $indexedArray[array_rand($indexedArray)];
?>
Try other methods by searching on the site. That is if this doesn’t work