JSFiddle - React, Tailwind, and code Playground

HTML

<div class="form-group">
                          <button type="button" id="more_fields" class="btn btn-danger" onclick="add_fields();"><span class="glyphicon glyphicon-fire"></span> click me</button>
                      </div>


                      <div class="form-group">
                          <div id="room_fileds">
                              <div>
                                  <label>how the hell do i add a remove button for each new generated input?</label>
                                  <div class="content">

                                      <?php
                                      function not_empty_string($s) {
                                          return $s !== " ";
                                      }
                                      $pieces = array_filter(explode(",", $test_stingu),'not_empty_string');

                                      foreach ($pieces as $piece) {
                                          $test_stinga = array_filter(explode("-", $piece),'not_empty_string');
                                          // scoate spatiul de la inceputul stringului
                                          $test_stinga=preg_replace('/\s+/', '', $test_stinga);
                                         ?>
                                          
                                          <p class="form-inline">Test: <select class="form-control" name="test[]" style="width:70px;"> <option>Test1</option> </select>
                                          <span></span></span>Number: <input class="form-control" type="number" style="width:70px;" name="number[]" value="<?php print $test_stinga[1] ?>"/></span>
                                          </p>

                                              <br>
                                      
<?php

                    
                                          }

                                          ?>


                                  </div>
                    ...