title: Dynamically create and populate input radio with PHP
body: <p>I'm currently working with PHP and HTML, I'm making a multiple choise exam, the PHP file contains four arrays, the first one storage the questions, the second one storages the probable answers for option "a)", the third one storages the probable answers for option "b)" and finally  the last one storages the answers for option "c)"</p>
  
  <p>Here his the code to create and populate both the questions and the multiple choises.</p>
  
  <pre><code>for($i=0; $i&lt;20; $i++){
      echo "$i.".$preguntas[$i]."&lt;BR&gt;";
      echo"&lt;input type = 'radio'  name='R$i'&gt;a)".$r1[$i]."&lt;br&gt;";
      echo"&lt;input type = 'radio'  name='R$i'&gt;b)".$r2[$i]."&lt;br&gt;";
      echo"&lt;input type = 'radio'  name='R$i'&gt;c)".$r3[$i]."&lt;br&gt;";
      echo "&lt;BR&gt;&lt;BR&gt;";
  
  }  
  </code></pre>
  
  <p>I'm having some troubles to make this work, any idea how coud I grade the correct answers</p>
  
  <p>Thanks in advance</p>