multi dimensional array in random order
<p>I want to make it so that my multi dimensional array is in a random order. How would you do it?</p>

<pre><code>// This is how the array looks like
print_r($slides);

Array
(
    [0] =&gt; Array
        (
            [id] =&gt; 7
            [status] =&gt; 1
            [sortorder] =&gt; 0
            [title] =&gt; Pants
        )

    [1] =&gt; Array
        (
            [id] =&gt; 8
            [status] =&gt; 1
            [sortorder] =&gt; 0
            [title] =&gt; Jewels
        )

    [2] =&gt; Array
        (
            [id] =&gt; 9
            [status] =&gt; 1
            [sortorder] =&gt; 0
            [title] =&gt; Birdhouse
        )

    [3] =&gt; Array
        (
            [id] =&gt; 10
            [status] =&gt; 1
            [sortorder] =&gt; 0
            [title] =&gt; Shirt
        )

    [4] =&gt; Array
        (
            [id] =&gt; 11
            [status] =&gt; 1
            [sortorder] =&gt; 0
            [title] =&gt; Phone
        )

)

// This how the result is if I use array_rand()
print_r(array_rand($slides, 5));

Array
(
    [0] =&gt; 0
    [1] =&gt; 1
    [2] =&gt; 2
    [3] =&gt; 3
    [4] =&gt; 4
)

// This how the result is if I use shuffle()
print_r(shuffle($slides));

1
</code></pre>
