I am after a little help here. I need to randomize an image array's order.
For example, if I have 3 images, I need them to reload each time in a different order.
Also, this is the instructions given to me on how to implement the code:
If this is PHP code, use a return statement to send your output to the block. For example:
$my_output = 'Hello, world.';
return $my_output;
My current code is HTML, and goes like this:
<div class="ad">
<a href="http://www.linkedsite.com/" target="_blank"><img src="myimagesdirectpath/img.png" alt="linkedsitename" /></a>
<br />
<a href="http://www.linkedsite.com/" target="_blank"><img src="myimagesdirectpath/img.png" alt="linkedsitename" /></a>
<br />
<a href="http://www.linkedsite.com/" target="_blank"><img src="myimagesdirectpath/img.png" alt="linkedsitename" /></a>
</div>
What I need to do is somehow turn my HTML code into a PHP code that allows the images order to be randomized, while maintaining the original instructions to "Use an output statement" to send my code to the sidebar.
Thanks! and I wish I knew more