title: codeigniter form_radio()
body: <p>---- I have solved the radio button problem. now the problem is i need to send the value $thing->quistionNo in the controller along with the answer.--- </p>
  
  <p></p>
  
  <pre><code>    &lt;?php echo form_open(base_url() . 'things/show'); 
  
           foreach ($data-&gt;result()as $thing) { 
  
  
  
                  echo $thing-&gt;questionNo.". ".$thing-&gt;question;  
  
                   $qno =array(
          'name'  =&gt;   'qno',
          'id'    =&gt;   'qno',
          'value' =&gt;   $thing-&gt;questionNo        
          );
  
  
                  //$qno = $thing-&gt;questionNo; 
                  var_dump($qno);
                  ?&gt;
  
  
  
              &lt;ul&gt;
                  &lt;li&gt;
  
                      &lt;div&gt;
  &lt;?php echo form_radio("answer", "1", (set_value("answer") == "1"));
  echo $thing-&gt;option1; ?&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
  
                  &lt;li&gt;
  
                      &lt;div&gt;
  &lt;?php echo form_radio("answer", "2", (set_value("answer") == "2"));
  echo $thing-&gt;option2; ?&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;            
  
                  &lt;li&gt;
  
                      &lt;div&gt;
  &lt;?php echo form_radio("answer", "3", (set_value("answer") == "3"));
  echo $thing-&gt;option3; ?&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
  
                      &lt;div&gt;
  &lt;?php echo form_radio("answer", "4", (set_value("answer") == "4"));
  echo $thing-&gt;option4; ?&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
                      &lt;?php } 
                      echo form_submit(array('name' =&gt; 'submit'), 'Submit Answer'); 
                      echo form_close();
                      ?&gt;
              &lt;/body&gt;
              &lt;/html&gt;
  </code></pre>