@php $i = 0; //จำนวนรูป $bb = 1; //กำหนดการเริ่มต้น $w = 100; //ความกว้างรูป $count_ = 0; if (isset($mainpart->mainpartsub_name)) { $count_ = count($mainpart->mainpartsub_name); } @endphp @php $image_position = []; $x = 1; foreach ($photoselect as $p) { if ($x <= $num1) { $image_position[$x]['name'] = mePHOTO($casedata->hn, $p['na'],$folderdate); $image_position[$x]['tx'] = $p['tx']; $image_position[$x]['sc'] = $p['sc']; } $x++; } @endphp {!! tablePICPDF($picperrow, $image_position, "width='161px' height='155px'") !!}