title: php sort cells in column from 1 to unlimited in table
body: <p>i have table with php code like this</p>
  
  <pre><code>name    points
  
  jeme      19
  yoka      15
  zinga     13
  </code></pre>
  
  <p>please do it by php code and also no i will give you my code to edit</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php 
  
  // make connecion
  mysql_connect('localhost', 'db user', '');
  
  // Select Database
  mysql_select_db ('db name');
  
  
  $sql="SELECT sum(points) as sumpoints , name FROM wp_wp_pro_quiz_toplist group by name order by sumpoints DESC";
  
  $records=mysql_query($sql);
  
  
  
  
  ?&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;الاحصائيات النهائية لمسابقة اكتوبر&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;table class="wpProQuiz_toplistTable"&gt;
      
     &lt;tr&gt;
     
      &lt;th style=""&gt;Name&lt;/th&gt;
      &lt;th style="width: 60px;"&gt;Points&lt;/th&gt;
     &lt;tr&gt;
  &lt;?php 
  
   while($wp_wp_pro_quiz_toplist=mysql_fetch_assoc($records)) {
    
    echo "&lt;tr&gt;"; 
    
   
    
    echo "&lt;td&gt;".$wp_wp_pro_quiz_toplist[name]."&lt;/td&gt;";
    
    echo "&lt;td&gt;".$wp_wp_pro_quiz_toplist[sumpoints]."&lt;/td&gt;";
    
    echo "&lt;/tr&gt;"; 
    
    
    }// End While
  
  ?&gt;               
             
                    
   &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>every thing is ok with this table and i ordered names by name who win more points as you see but i still want another column and i will call it [position] and shourcut for it pos. , cause i want to rank user by this way ( numbers 1-2-3-4 ) like this </p>
  
  <pre><code>pos.     name      points
  
   1       jeme         19
   2       yoka         15
   3       zinga        13
  </code></pre>