Closed kurorido closed 1 year ago
Add it to last part of the loop.
I don't think it's a good idea to add $form_values = [];
to the last part of the loop.
because the line $form_values['form_id'] = $result->form_id;
is above it.
I know it's fine to use variable without declare it in PHP, but it shouldn't be a good practice.
form_values is not cleared in each loop.
The previous value in result will pollute to the next result.
For example, a result have a key "text-257" but the next result doesn't have the key then the value in the previous is keeped to the next result.