PHP shuffle function
<p>I have an array of filenames gathered from a folder as follows: </p>

<pre><code>$g = glob('uploads/thumbs/*.jpg');
</code></pre>

<p>Now, basing on the user choice, the images will be displayed in chronological order with an <code>rsort($g)</code> or shuffled by <code>shuffle($g)</code>.</p>

<p>The problem is that the shuffle always returns the same order of the pictures! How can I solve this?</p>
