I have some markup like so:
<div class="list">
<article> content... </article>
<article> content... </article>
<article> content... </article>
<article> content... </article>
<article> content... </article>
</div>
What I want to do is make the order of what these articles appears on the page random. What would be the best and easiest way to do this?
I thought about doing some sort of length count and storing it in an array and then spitting them back out again in a random order. e.g.
$numbers = range(1, 20);
shuffle($numbers);
foreach ($numbers as $number) {
echo "$number ";
}
Can anyone offer ideas etc? Thanks
NOTE: These are not coming from a database!