Concept: Adding Floors and Room counts and Room Numbers in a Hotel and saving it in a db
Front end Design:
Please have a look at this image
Backend what i am getting now:
"floor" => array:3 [▼
0 => "3"
1 => "2"
2 => "1"
]
"room_count" => array:3 [▼
0 => "3"
1 => "3"
2 => "5"
]
"room_number" => array:11 [▼
0 => "101"
1 => "102"
2 => "103"
3 => "201"
4 => "202"
5 => "203"
6 => "101"
7 => "102"
8 => "103"
9 => "104"
10 => "105"
]
The Question is:
How can i loop through to get:
Floor 3 has the room numbers 101, 102, 103
Floor 2 has the room numbers 201, 202, 203
Floor 1 has the room numbers 101, 102, 103, 104, 105