Get Random Element From Array using PHP October 9, 2020 PHP 0 Comments 594 Views array_rand function <?php $data = [10, 3, 17, 50, 15]; $key = array_rand($data); $element = $data[$key]; echo $element;
Leave a Comment
Cancel reply