title: How to get id while in a loop in php
body: <p>Wanted to get 2 values id and name but im confuse how get it, i wanted to show the id in the link. heres the sample code.</p>
  
  <pre><code> echo "&lt;table width=\"100%\" border=\"1\" cellpadding=\"5\" cellspacing=\"2\" bordercolor=\"#FFFFFF\"&gt;";
  
              $count = 1;
              $id=$_GET['id'];
              $col1 = $col2 = array();
              $rowcount = round(mysqli_num_rows($nquery) / 2);
              while($crow = mysqli_fetch_assoc($nquery)) { 
                  if($count &gt; $rowcount) $col2[] = $crow['title'];
                  else $col1[] = $crow['title'];
                  $count++;
              }
              $counter = 0; // Arrays start with 0
              foreach($col1 as $crow) { // $col1 will always be &gt;= $col2
                  $row2 = (isset($col2[$counter])) ? $col2[$counter] : "";
                  echo "&lt;tr&gt;&lt;td&gt;&lt;a href='index.php?page=".$id."'&gt;" . $crow . "&lt;/td&gt;&lt;td&gt;" . $row2 . "&lt;/td&gt;&lt;/tr&gt;"; 
                  $counter++;
              }
              echo "&lt;/table&gt;";
            ?&gt;`
  </code></pre>
  
  <p>id wont show up on the link. Hope someone can help. Thanks</p>