Server IP : 66.29.132.124 / Your IP : 3.145.61.142 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/themes/Mytravel/Boat/frontend/booking/ |
Upload File : |
<div class="table-responsive"> <table class="table table-striped table-inverse mb-1"> <tbody> <?php $rows = array_values($rows); $from = $rows[0]['from']; $array = []; foreach ($rows as $item => $value) { if($item==0){ $from = $value['from']; $array[$from] = $value; } if (!empty($rows[($item - 1)]['price']) and $value['price'] == $rows[($item - 1)]['price'] ) { $array[$from]['to'] = $value['from']; $array[$from]['to_html'] = $value['from_html']; } elseif(!empty($rows[($item - 1)]['price']) and $value['price'] != $rows[($item - 1)]['price'] ) { $from = $value['from']; $array[$from] = $value; $array[$from]['to'] = $value['from']; $array[$from]['to_html'] = $value['from_html']; }else{ $array[$from]['to'] = $value['to']; $array[$from]['to_html'] = $value['to_html']; } } ;?> @foreach($array as $item=>$value) <?php $days = max(1,floor(($value['to'] - $value['from']) / DAY_IN_SECONDS)+1); ?> <tr> <td>{{$value['from_html']}} <i class="fa fa-long-arrow-right"></i> {{$value['to_html']}}</td> <td class="text-right">{{format_money($value['price']*$number)}}</td> </tr> @endforeach </tbody> </table> </div>