RieqyNS13 icon

Untitled

RieqyNS13 | PRO | 01/02/19 07:01:00 PM UTC | 0 ⭐ | 396 👁️ | Never ⏰ | []
PHP |

980 B

|

None

|

0 👍

/

0 👎

<?php
            include("config.php");
            $q = listtes();
            $total = 0;
            foreach ($q as $r)
            {
                $id = $r[1];
                $daftar = listdalam($id);  
                $index=1;
                foreach($daftar as $res){
                    $res0="";
                    $res1="";
                    if($index==1){
                        $res0=$res[0];
                        $res1=$res[1];
                    }
                echo "<tr>
                        <td> $res0</td>
                        <td> $res1</td>
                        <td> $res[2]</td>
                        <td> $res[3]</td>
                        <td> $res[4]</td>
                        </td>
                     </tr>
                     <tr>";
                     $harga = $res[4];
                     $total = $total + $harga;
                    $index=$index+1;
                }
                echo "<td colspan=3>total</td>
                        <td>$total</td>
                     </tr>";
            }
            ?>

Comments