.append array fields

.append array fields

I am using jquery append() to clone a div consisting textfield and checkbox both as separate arrays. Obviously, when posted checkbox will only show if checked.

Is it possible to link the checkbox and textfield with a common key and the key also increment with appended div?
or
is it possible to change the field name every time it's appended?

Hope I am clear in explaining. Below is the code.
  1.        <script type="text/javascript">
  2.              $(document).ready(function() {
  3.                    $("#addTestAppend").click(function() {
  4.                          $("#testAppend").append(
  5.                                "<div>"
  6.                                      +"<input type=\"text\" name=\"name[]\" /><br />"
  7.                                      +"<input type=\"checkbox\" name=\"needDivTwo[]\" class=\"needDivTwo\" />"
  8.                                +"</div>"
  9.                          );
  10.                    });
  11.              });
  12.        </script>
  13.        <form name="name" method="post" action="formProcess.php">
  14.              <div id=testAppend>
  15.                    <div>
  16.                          <input type="text" name="name[]" /><br />
  17.                          <input type="checkbox" name="needDivTwo[]" class="needDivTwo" />
  18.                    </div>
  19.              </div>
  20.              <input type="button" id="addTestAppend" value="[ Add Append ]"  />
  21.        </form>