<?php

include("jsondata3.php");

$arr = json_decode( $jsonData3, TRUE);
//print_r($arr);

$loop = 0;
foreach($arr as $item) { //foreach element in $arr
    //$uses = $item['var1']; //etc
    $loop++;
    echo "<tr>";
    echo "    <td>" .$loop. "</td>";
    echo "    <td>" .$item['jenama']. "</td>";
    echo "    <td>" .$item['model']. "</td>";
    echo "    <td>" .$item['kapasiti']. "</td>";
    echo "    <td>" .$item['saiz']. "</td>";
    echo "    <td>";
    echo "        <a href='#" .$item['id']. "'>";
    echo "            <i class='ti-info-alt' title='Papar Maklumat'></i>&nbsp;&nbsp;&nbsp;";
    echo "        </a>";
    echo "        <a href='edit_prod.php?id=" .$item['id']. "'>";
    echo "            <i class='ti-pencil' title='Kemaskini Maklumat'></i>&nbsp;&nbsp;&nbsp;";
    echo "        </a>";
    echo "    </td>";
    echo "</tr>";
}

?>