title: Adding 2 to a variable each time
body: <p>I need the variable $Dno to add two each time it prints in the loop.</p>
  
  <p>Below is my code.</p>
  
  <pre><code>$Dno = '18' + '2';
  
  
  
          while($fdata=$qq-&gt;fetch(PDO::FETCH_ASSOC))
          {   
  
              //Description Binder from this Table in DB
              while($ffdata=$qqq-&gt;fetch(PDO::FETCH_ASSOC))
              {
                      $dta =  $ffdata['code'];
                      $sq = "SELECT * FROM hcpc WHERE code = :dta";
                      $qr=$con-&gt;prepare($sq);
                      $qr-&gt;bindvalue(":dta", $dta);
                      $qr-&gt;execute();
                      while($hcdata=$qr-&gt;fetch(PDO::FETCH_ASSOC))
                      {
                          $worksheet
                              -&gt;setCellValue('C' . $Dno++, $hcdata['description']);
                      }
              }   
  
          }
  </code></pre>
  
  <p>As you can see, its now making 18 = 20.. but in the loop it will only add 1 each time.. So the next line would be 21.. I need it to be 22.</p>
  
  <p>If I just did this code...'</p>
  
  <pre><code>$Dno = '18' + '2';
  
  
  
          while($fdata=$qq-&gt;fetch(PDO::FETCH_ASSOC))
          {   
  
              //Description Binder from hcpc Table in DB
              while($ffdata=$qqq-&gt;fetch(PDO::FETCH_ASSOC))
              {
                      $dta =  $ffdata['code'];
                      $sq = "SELECT * FROM code WHERE code = :dta";
                      $qr=$con-&gt;prepare($sq);
                      $qr-&gt;bindvalue(":dta", $dta);
                      $qr-&gt;execute();
                      while($hcdata=$qr-&gt;fetch(PDO::FETCH_ASSOC))
                      {
                          $worksheet
                              -&gt;setCellValue('C' . $Dno, $hcdata['description']);
                      }
              }
  
          }
  </code></pre>
  
  <p>it also makes the first line  = 20 but then every line will also = 20</p>