ENCUESTA: {{ mb_strtoupper($title) }}
EMPRESA: {{ $company->name }} N° de participantes: {{ $number_participants }} FECHA: {{ date('Y-m-d') }}
@foreach ($sections as $section)
{{ mb_strtoupper($section['section']) }}
@foreach ($section['questions'] as $key => $array_question) @php $keys = array_keys($array_question); $first_key = $keys[0]; @endphp @for ($i = 0; $i < 3; $i++) @if (isset($array_question[$first_key + $i]['answers'])) @else @endif @endfor @php $max = max( count($array_question[$first_key]['answers']), isset($array_question[$first_key + 1]) ? count($array_question[$first_key + 1]['answers']) : 0, isset($array_question[$first_key + 2]) ? count($array_question[$first_key + 2]['answers']) : 0, ); @endphp @for ($i = 0; $i < $max; $i++) @for ($j = 0; $j < 3; $j++) @if (isset($array_question[$first_key + $j]['answers'][$i])) @else @endif @endfor @endfor
@isset($array_question[$first_key]['question']) {{ $array_question[$first_key]['question'] }} @endisset @isset($array_question[$first_key + 1]['question']) {{ $array_question[$first_key + 1]['question'] }} @endisset @isset($array_question[$first_key + 2]['question']) {{ $array_question[$first_key + 2]['question'] }} @endisset
RESPUESTA CANTIDAD PORCENTAJE
{{ $array_question[$first_key + $j]['answers'][$i]['answer_text'] }} {{ $array_question[$first_key + $j]['answers'][$i]['count'] }} {{ $array_question[$first_key + $j]['answers'][$i]['percentage'] }}%
@endforeach @endforeach