' . $key . '
'; if (isset($value['sub_arrays']) && count($value['sub_arrays']) > 0 && is_array($value['sub_arrays'])) { $userFilledAnswer = json_decode($value['user_filled_answer'], true); if( $userFilledAnswer!=null ) { $subIds = explode(',', $userFilledAnswer['sub_ids']); $subIds = array_map('trim', $subIds); // Trim whitespace around each value foreach ($value['sub_arrays'] as $subId => $subLabel) { $isChecked = in_array((string) $subId, $subIds) ? 'checked' : ''; echo '' . $key . '
'; echo '";print_r(json_decode(json_encode($submittedFormValue))); } } } @endphp