title: PHP, Jquery get multi array, combine a row
body: <p>Concept:
  Adding Floors and Room counts and Room Numbers in a Hotel and saving it in a db</p>
  
  <p>Front end Design:</p>
  
  <p>Please have a look at this image</p>
  
  <p><a href="https://i.stack.imgur.com/06z9h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/06z9h.png" alt="enter image description here"></a></p>
  
  <p>Backend what i am getting now:</p>
  
  <pre><code> "floor" =&gt; array:3 [▼
      0 =&gt; "3"
      1 =&gt; "2"
      2 =&gt; "1"
    ]
    "room_count" =&gt; array:3 [▼
      0 =&gt; "3"
      1 =&gt; "3"
      2 =&gt; "5"
    ]
    "room_number" =&gt; array:11 [▼
      0 =&gt; "101"
      1 =&gt; "102"
      2 =&gt; "103"
      3 =&gt; "201"
      4 =&gt; "202"
      5 =&gt; "203"
      6 =&gt; "101"
      7 =&gt; "102"
      8 =&gt; "103"
      9 =&gt; "104"
      10 =&gt; "105"
    ]
  </code></pre>
  
  <p>The Question is: </p>
  
  <p>How can i loop through to get:<br>
  Floor 3 has the room numbers 101, 102, 103<br>
  Floor 2 has the room numbers 201, 202, 203<br>
  Floor 1 has the room numbers 101, 102, 103, 104, 105  </p>