title: how to show random articles
body: <p>I am working on project which shows articles and this was done by article manager (a ready to use php script) but I have a problem, I want to show only four article titles and summaries from old list of article randomly which contains 10 article. Any idea how to achieve this process?
  I have auto generated summary of article </p>
  
  <pre><code>&lt;div class="a1"&gt;
  &lt;h3&gt;&lt;a href={article_url}&gt;{subject}&lt;/h3&gt;    
  &lt;p&gt;{summary}&lt;p&gt;&lt;/a&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>When a new article is added the above code will generated and add into summary page.  I want to add it to side of the main article page, where user can see only four article out of ten or more randomly.</p>
  
  <pre><code>&lt;?php
  $lines = file_get_contents('article_summary.html');
  $input = array($lines);
  $rand_keys = array_rand($input, 4);
  echo $input[$rand_keys[0]] . "&lt;br/&gt;";
  echo $input[$rand_keys[1]] . "&lt;br/&gt;";
  echo $input[$rand_keys[2]] . "&lt;br/&gt;";
  echo $input[$rand_keys[3]] . "&lt;br/&gt;";
  ?&gt;
  </code></pre>
  
  <p>Thanks for your kindness.</p>