title: PHP Array Shuffle HTML Links
body: <p>Ok I'm going to try and explain this the best I can, I have 25 links in this format:</p>
  
  <pre><code>&lt;a href="http://blabla.com" title="bla bla"&gt;bla bla&lt;/a&gt;
  </code></pre>
  
  <p>First thing first, I need to add these 25 links into an array, which I am bit unsure of how to do it because its html, secondly I need to shuffle the array to choose 7 of them randomly and then display those 7.</p>
  
  <p>Hope someone can help, this is beyond me, thanks in advance.</p>
  
  <hr>
  
  <p>Ok, a little update, I have found a way of getting 1 html link to display randomly, could anyone help me with getting 7 out?</p>
  
  <pre><code>&lt;?php
  // Create the array
  $links = array();
  
  $links[0] = '&lt;a href="http://bla1.co.uk" title="bla1"&gt;bla1&lt;/a&gt;';
  $links[1] = '&lt;a href="http://bla2.co.uk" title="bla2"&gt;bla2&lt;/a&gt;';
  $links[2] = '&lt;a href="http://bla3.co.uk" title="bla3"&gt;bla3&lt;/a&gt;';
  // Count links
  $num = count($links);
  // Randomize order
  $random = rand(0, $num-1);
  // Print random link
  echo $links[$random];
  ?&gt;
  </code></pre>