title: How to get the values of the radio buttons with variable names in php?
body: <p>This code gets some data from the database and displays it with a group of radio buttons. How do I get the value for every group of radio buttons??</p>
  
  <pre><code>&lt;form name="functional"  method="post" action="funcsub.php"&gt;
  
      &lt;?php
      $n=0;
      $con=mysqli_connect('localhost','Sanjana','sanjana');
      mysqli_select_db($con,'mydatabase');
  
      $sql = mysqli_query($con,"select * from functional") or die("Failed");
      while($result = mysqli_fetch_array($sql)){
      ?&gt;
          &lt;br/&gt;
          &lt;?php
          echo $result["Skill"];
          echo "&lt;/br&gt;";
          echo"&lt;input type='radio' name='tech[.$n.]' value='0'&gt;0";
          echo"&lt;input type='radio' name='tech[.$n.]' value='1'&gt;1";         
          echo"&lt;input type='radio' name='tech[.$n.]' value='2'&gt;2";         
          echo"&lt;input type='radio' name='tech[.$n.]' value='3'&gt;3";          
          echo"&lt;input type='radio' name='tech[.$n.]' value='4'&gt;4";
          echo"&lt;input type='radio' name='tech[.$n.]' value='5'&gt;5";
          $n=$n+1;
      }  
      ?&gt;   
      &lt;br/&gt;
      &lt;input type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;    
  </code></pre>