title: PHP code that will display all links that are visited more than 20 times
body: <p>I am looking for help in my project. I want to display all those links which are visited more then 20 times and also highest visited site will be at first.</p>
  
  <p>I mean if google is visited through my website for 50 times then it will come to rank 1 like</p>
  
  <p>1) [a link]Google[a]</p>
  
  <p>Now second is Facebook which is visited for 30 times then it will come to </p>
  
  <p>2) [a link]Facebook[a]</p>
  
  <p>and if Facebook is viewed for 60 times then it will automatically come to first rank and Google will be at second.</p>
  
  <p>For the rank, I've created column in database and it will always increase by +1 after every redirection to the website.</p>
  
  <p>Please help me with PHP and MySQL code.</p>
  
  <p>My table structure is:</p>
  
  <pre><code>ID, URL, CODE, DATE, VIEW, KEYWORD, DESCRIPTION
  </code></pre>
  
  <p>these are my codes :-</p>
  
  <pre><code>$a = "SELECT `url` FROM `url` ORDER BY `view` DESC";
  
  $b = mysql_query($a);
  
  $c = mysql_fetch_array($b);
  
  print_r ($c);
  </code></pre>
  
  <p>and the result I am getting is </p>
  
  <pre><code>Array ( [0] =&gt; https://www.google.com [url] =&gt; https://www.google.com )
  </code></pre>
  
  <p>where I want</p>
  
  <pre><code>[0] =&gt;google.com
  [1] =&gt;facebook.com
  [1] =&gt;linkedin.com
  </code></pre>
  
  <p>so any suggestions?</p>