title: jQuery echo a variable twice or how to increment
body: <p>I have some input fields that will be generated dynamically by jQuery. Each time a button will be pressed there will be added two input fields. To handle the names there is an auto increment for <code>n</code>.  Now I thought I could use just one variable <code>n</code> to name the input tags.</p>
  
  <pre><code>$(wrapper).append("&lt;input class='add' name='xdata_" + n + "' placeholder='type in' type='text' value=''&gt;&lt;input class='add' name='xdata_"+ n++ +"' placeholder='Datum' type='text' value=''&gt;");
  </code></pre>
  
  <p>First name tag will show the correct <code>n</code>. The problem is the second <code>n++</code> which will just echo <code>n</code> same as the first even when it should increment by <code>n++</code>. When setting a second variable it works, but I wanted to shorten code. So I would like to know what I'm doing wrong?</p>
  
  <p>Thanks alot.</p>