how to send an array that has a key x and that key contains another array with the responses of an input

0

hi all my problem is the following, I have these inputs where I send user information

especially this is where he sent the information

<input type="{{$tag->tag_type}}" class="form-control" value="{{$option->option_value}}"  name="tag_user_response[{{$tag->tag_name}}][]" required>

When I sent the information I receive this

  "tag_user_response" => array:6 [▼
0 => array:1 [▶]
1 => array:1 [▶]
2 => array:1 [▶]
3 => array:1 [▶]
4 => array:1 [▶]
"gustos" => array:3 [▼
  0 => "bicicleta"
  1 => "futbol"
  2 => "natacion"
]]

the one that says tastes is the one that sent in the previous input, I need that this one like the others, ejm

5 => array:1 [▼
  "gustos" => array:3 [▼
    0 => "bicicleta"
    1 => "futbol"
    2 => "natacion"]]

How should I send the info from the input so that it fits like this? thanks in advance

    
asked by Sergio Benavides 14.06.2018 в 22:53
source

0 answers