
<?php  header("Content-Type: application/vnd.ms-word");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-disposition: attachment;filename=Report.doc");
?>

<!--  word format    -->
<table width="100%" cellpadding="10px;" style="margin-top: 20px;">


 			<input type="hidden" name="_token" value="{{ csrf_token() }}">

                   <input type="hidden" name="fileview_template_id" id="fileview_template_id" value="">

            @foreach($word_arr as $word)

            	@if($word->top)
                <tr ><td colspan="3">
                {{$word->template->top}} : {{$word->top}}</td>
                </tr>
                @endif
                <tr >
                <td width="33%">
                @if($word->top1)
                
                {{$word->template->top1}} : {{$word->top1}}
                
                @endif
                &nbsp;
                </td>

                 <td width="33%">
                @if($word->top2)
                
                {{$word->template->top2}} : {{$word->top2}}
                
                @endif
                &nbsp;
                </td>

                  <td width="33%">
                @if($word->top3)
               
                {{$word->template->top3}} : {{$word->top3}}
                
                @endif
               &nbsp;
                </td>
                </tr>

                @if($word->mid)
                 <tr ><td colspan="3"> 
                {{$word->template->mid}} : {{$word->mid}}</td>
                </tr>
                @endif
                <tr >
                <td width="33%">
                @if($word->mid1)
                
                {{$word->template->mid1}} : {{$word->mid1}}
                
                @endif
                &nbsp;
                </td>
                  <td width="33%">
                @if($word->mid2)
               
                {{$word->template->mid2}} : {{$word->mid2}}
                
                @endif
                &nbsp;
                </td>
                  <td width="33%">
                @if($word->mid3)
              
                {{$word->template->mid3}} : {{$word->mid3}}
               
                @endif
                 &nbsp;
                 </td>
                 </tr>

                @if($word->bottom)
                 <tr ><td colspan="3" >
                {{$word->template->bottom}} : {{$word->bottom}}</td>
               </tr>>
                @endif
                 <tr>
                 <td width="33%">
                @if($word->bottom1)
               
                {{$word->template->bottom1}} : {{$word->bottom1}}
              
                @endif
                  &nbsp;
                 </td>
                 <td width="33%">
                @if($word->bottom2)
               
                {{$word->template->bottom2}} : {{$word->bottom2}}
                
                @endif
                &nbsp;
                </td>
                 <td width="33%">
                @if($word->bottom3)
                
                {{$word->template->bottom3}} : {{$word->bottom3}}
              
                @endif
    			&nbsp;
                </td>
                </tr>
            @endforeach



        </table>