Javascript input loop
<p>I am trying to create a select box which will added new input according to the select value 
so I have coded</p>

<pre><code>&lt;span&gt;Rooms: 
        &lt;select name="number_of_rooms" class="" id="number_of_rooms" onchange="getRooms(this.value)"&gt;
            &lt;option value="1"&gt;1&lt;/option&gt;
            &lt;option value="2"&gt;2&lt;/option&gt;
            &lt;option value="3"&gt;3&lt;/option&gt;
            &lt;option value="4"&gt;4&lt;/option&gt;
            &lt;option value="5"&gt;5&lt;/option&gt;
        &lt;/select&gt;
    &lt;/span&gt;
function getRooms(numRoom)
    {
        var roomMember='';
        for(var iRoom=0; iRoom&lt;numRoom; iRoom++)
        {
            roomMember+='&lt;span class="roomPersonEach"&gt;&lt;h3&gt;Room '+(iRoom+1)+' :&lt;/h3&gt;&lt;span&gt;Adults: &lt;select name="number_of_adults['+(iRoom+1)+']" class="" id="number_of_adults['+(iRoom+1)+']"&gt;&lt;option value="1"&gt;1&lt;/option&gt;&lt;option value="2"&gt;2&lt;/option&gt;&lt;option value="3"&gt;3&lt;/option&gt;&lt;option value="4"&gt;4&lt;/option&gt;&lt;/select&gt;&lt;/span&gt;&lt;span&gt;Children: &lt;select name="number_of_child['+(iRoom+1)+']" class="" id="number_of_child['+(iRoom+1)+']"&gt;&lt;option value="0"&gt;0&lt;/option&gt;&lt;option value="1"&gt;1&lt;/option&gt;&lt;option value="2"&gt;2&lt;/option&gt;&lt;option value="3"&gt;3&lt;/option&gt;&lt;option value="4"&gt;4&lt;/option&gt;&lt;/select&gt;&lt;/span&gt;&lt;/span&gt;';
        }
        $('#eachRoom').html(roomMember);
    }
</code></pre>

<p>My problem is that I want to send the array to the PHP. I mean i want to send the "number_of_adults" and "number_of_child" two arrays to my php file. I have the AJAX file, but can't get the full array of those field. Please help me.</p>

<p>Please don't down vote</p>
