Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>&lt;?php $images= array( 'twitter-48.png', 'facebook-48.png', 'plus-48.png', 'github-48.png' ); $keys= range(0, count($images)- 1); shuffle($keys); foreach($keys as $key) { print "&lt;div&gt;{$images[$key]}&lt;/div&gt;"; } </code></pre> <p>EDIT:</p> <pre><code>&lt;?php $images= array( array('href'=&gt; 'http://twitter.com/', 'alt'=&gt; 'Twitter', 'src'=&gt; '/images/twitter-48.png'), array('href'=&gt; 'http://facebook.com/', 'alt'=&gt; 'Facebook', 'src'=&gt; '/images/facebook-48.png'), array('href'=&gt; 'https://plus.google.com/', 'alt'=&gt; 'Google Plus', 'src'=&gt; '/images/plus-48.png'), array('href'=&gt; 'https://github.com/', 'alt'=&gt; 'GitHub', 'src'=&gt; '/images/github-48.png') ); $keys= range(0, count($images)- 1); shuffle($keys); ?&gt; &lt;div class='location1'&gt; &lt;a href='&lt;?php print $images[$keys[0]]['href']; ?&gt;'&gt;&lt;img alt='&lt;?php print $images[$keys[0]]['alt']; ?&gt;' src='&lt;?php print $images[$keys[0]]['src']; ?&gt;'&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class='location2'&gt; &lt;a href='&lt;?php print $images[$keys[1]]['href']; ?&gt;'&gt;&lt;img alt='&lt;?php print $images[$keys[1]]['alt']; ?&gt;' src='&lt;?php print $images[$keys[1]]['src']; ?&gt;'&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class='location3'&gt; &lt;a href='&lt;?php print $images[$keys[2]]['href']; ?&gt;'&gt;&lt;img alt='&lt;?php print $images[$keys[2]]['alt']; ?&gt;' src='&lt;?php print $images[$keys[2]]['src']; ?&gt;'&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class='location4'&gt; &lt;a href='&lt;?php print $images[$keys[3]]['href']; ?&gt;'&gt;&lt;img alt='&lt;?php print $images[$keys[3]]['alt']; ?&gt;' src='&lt;?php print $images[$keys[3]]['src']; ?&gt;'&gt;&lt;/img&gt;&lt;/a&gt; &lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload