@extends('admin.layouts.app') @php $a = 0; $b = 0; $c = 0; $d = 0; $e = 0; $addon = 1; @endphp @section('styles') @endsection @section('header') @include('admin.layouts.header') @endsection @section('sidemenu') @include('admin.layouts.sidemenu') @endsection @section('content')

Result

@foreach ($res_question_details as $row) @php $a = $row->vanswer1; $b = $row->vanswer2; $c = $row->vanswer3; $d = $row->vanswer4; $e = $row->vanswer5; $total = $a+$b+$c+$d+$e; if($total != 0){ $addon = 100/$total; } $a = round($a*$addon); $b = round($b*$addon); $c = round($c*$addon); $d = round($d*$addon); $e = round($e*$addon); @endphp

Q: {{$row->question}}

@if(!empty($row->answer1))
A

{{ $row->answer1 }}

@endif @if(!empty($row->answer2))
B

{{ $row->answer2 }}

@endif @if(!empty($row->answer3))
C

{{ $row->answer3 }}

@endif @if(!empty($row->answer4))
D

{{ $row->answer4 }}

@endif @if(!empty($row->answer5))
E

{{ $row->answer5 }}

@endif

percent

@endforeach
@foreach ($res_question_details as $row) @php $next_question_id=DB::select("select question_id from aocniancon_questions where session_id=$row->session_id and topic_id=$row->topic_id and is_voted!=1 order by create_date asc limit 1"); @endphp @endforeach @if($next_question_id)
@foreach($next_question_id as $q_id) Next Question @php break; @endphp @endforeach
@endif @if(count($winner_details) > 0) @endif
@endsection @section('footer') @include('admin.layouts.footer') @endsection @section('scripts') @endsection