So i have 3 form fields. Each time they are submitted the inputs are display as well as the previous inputs are display. Each time the set of inputs are submitted, each output is put into a div with the same name. That name is increased by one each time. So the first time submit is hit there is 3 <div id="id1"></div> then second submit is hit there are 3 <div id="id1"></div> and 3 <div id="id2"></div> .
What i need to do is wrap each group of <div id="id(X)"></div>. So if the submit button has been hit twice there should be :
<div id="wrap"> <div id="id1"></div> <div id="id1"></div> <div id="id1"></div> </div>
<div id="wrap"> <div id="id2"></div> <div id="id2"></div> <div id="id2"></div> </div>
Let me know if it would be easier if i show you have i am getting each <div id="id(X)"></div>