How to sort random array in PHP

0

Hello everyone, I have a problem with how to sort this array with values of sub arrays so that whenever the script is called come with different values in a random way?

This is the normal array:

$results = array (0 => array 1 => int 5, 1 => array 2 => int 3, 2 => array 8 => int 5);

Ex: Script Wheel first come

$results = array (1 => array 2 => int 3, 0 => array 1 => int 5, 2 => array 8 => int 5);

Ex: Script Wheel the second time come

$results = array (2 => array 8 => int 5, 1 => array 2 => int 3, 0 => array 1 => int 5);

And so on!

    
asked by anonymous 14.02.2017 / 01:37

1 answer

1

I think this question is duplicate, as I did not find it on the network ... Your search for the shuffle

$numbers = array(array(1),array(2),array(5),array(10),array(20),array(3),array(4),array(60));
var_dump($numbers);
echo "<br/>";
shuffle($numbers);
var_dump($numbers);
    
14.02.2017 / 01:50