title: Problem with nested for loops in jQuery
body: <p>I'm a jQuery newbie, so be gentle! I have a loop that outputs extra fields in a form (based on  value). All good so far. However, in my extra fields is a date of birth  set, which I normally create days/years options using a loop. My question is, how do I create this inner loop inside my outer loop? Here's the basic outline so far:</p>
  
  <pre><code>    function addRow() {
      for(var i=1;i&lt;numPax;i++)
      {
          $('#additionalPax').append("My additional fields HTML in here.");
      }
  }
  </code></pre>
  
  <p>Now what I want to do is add a loop in my append string to create my day select for example. This isn't right, but something like this:</p>
  
  <pre><code>    function addRow() {
          for(var i=1;i&lt;numPax;i++)
          {
              $('#additionalPax').append("&lt;select name='dobDay'&gt;&lt;option selected='selected' value='1'&gt;1&lt;/option&gt;"+for(var d=2;d&lt;32;d++){+"&lt;option value="+(d)+"&gt;"+(d)+"&lt;/option&gt;"+}+"&lt;/select&gt;");
          }
  }
  </code></pre>
  
  <p>Any help very much appreciated.</p>