title: dynamically set value for a radio button with php
body: <p>Hello Coders,
               I have a dynamically created table in PHP and for each row there is a radio button. The intention is that depending upon which radio box is selected, the user can perform multiple functions like, Delete, Amend etc. I can make this all work with hard coded "Value" for the radio button like </p>
  
  <pre><code>echo "&lt;td&gt;" . '&lt;input type="radio" name="radioSelect" value="2"  checked="checked" /&gt;' .  "&lt;/td&gt;";
  </code></pre>
  
  <p>What I am looking for is a way to set the "2" dynamically. For example:</p>
  
  <pre><code>while($row = mysql_fetch_array($result) and $i&lt;=100)
   { 
    echo "&lt;tr&gt;";
        $sno= $row['SNo'];    
  
        echo "&lt;td&gt;" . '&lt;input type="radio" name="radioSelect" value= $sno  checked="checked" /&gt;' .  "&lt;/td&gt;";
   }
  </code></pre>
  
  <p>What is the syntax for this? Is this possible at all?</p>
  
  <p>Thanks for your help.</p>