I am explaining you, How to get random value in from an array PHP. we can use the shuffle() function in PHP to randomly shuffle the order of values in an array.
<?php
$list = array(11, 12, 13, 14, 15, 16);
shuffle($list);
foreach ($list as $value){
echo "$value" . "<br>";
}
?>
Result:
12
16
14
11
13
15
Hello, Welcome to webdeveloperindia.in. I am a full-stack web developer. Email – [email protected] | Skype – azaruddin23. I have knowledge of PHP, Laravel, Magento 1/2, Codeigniter, WordPress, Joomla, Shopify, Git, Bitbuket, jQuery, Ajax, Javascript and ReactJS.