<?php

include("jsondata.php");

$arr = json_decode( $jsonData, 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['name']. "</td>";
    echo "    <td>" .$item['reg']. "</td>";
    echo "    <td>" .$item['area']. "</td>";
    echo "    <td>" .$item['type']. "</td>";
    echo "    <td>";
    //echo "        <a href='show_manu.php?id=" .$item['id']. "'>";
    //echo "            <i class='ti-info-alt' title='Papar Maklumat'></i>&nbsp;&nbsp;&nbsp;";
    //echo "        </a>";
    //echo "        <a href='edit_manu.php?id=" .$item['id']. "'>";
    //echo "            <i class='ti-pencil' title='Kemaskini Maklumat'></i>&nbsp;&nbsp;&nbsp;";
    //echo "        </a>";
    //echo "        <a href='#'>";
    //echo "            <i class='ti-package' title='Senarai Produk'></i>&nbsp;&nbsp;&nbsp;";
    //echo "        </a>";
    echo "    </td>";
    echo "</tr>";
}

?>