title: PHP : Continue get me out
body: <p>Why my second if is never executed ? It seems like the continue sentence get me out of the foreach. I have tried the elseif without success.</p>
  
  <pre><code>        foreach($columns as $i=&gt;$column) 
          {
              // Check if column exists
              $sql = "SELECT '$column' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '$database' AND TABLE_NAME = '$strTable'";
              if(mysqli_real_query($link, $sql)) 
              {
                  echo 'Column '.$column.' was created! &lt;br&gt;';
                  continue; 
              }
              $sql = "alter table '$strTable' add column '$column' varchar (30)"; 
              if(mysqli_real_query($link, $sql)) 
              {
                  echo 'Column '.$column.' was created! &lt;br&gt;';
              }
              $cols .= $column.','; 
          }
  </code></pre>