title: php jquery selecting the specific checkbox inside the while fetch_array
body: <p>I have a problem selecting specific checkbox and putting higlight css for its div inside the mysql_fetch_array </p>
  
  <p>here's my code </p>
  
  <pre><code>$count=1;
  $query = mysql_query('SELECT * FROM thread');
  while($row = mysql_fetch_array($query))
  {
    echo "&lt;div class='row".$count."'&gt;&lt;input type='checkebox' class='chk_box".$count."'&gt; ".$row['title']."&lt;/div&gt;";
    $count++; 
  }
  
  &lt;script&gt;
   var count= "&lt;?php echo $count?&gt;";
   for(var y=1;y&lt;=count;y++){ 
  $('.chk_box'+y).click(function() {
    if(this.checked) {
      $('.row'+y).addClass('backcolor');
    }
    else{
      $('.row'+y).removeClass('backcolor');
    }
   });
          }
  &lt;/script&gt;
  </code></pre>