I'm trying to generate a table with data from an php array.
Here is my php code:
<?php
$result = array();
ob_start();
include 'include/podcastRead.php';
$result = ob_get_clean();
?>
HTML table:
<table class="mdl-data-table mdl-js-data-table" id="tablee">
<thead>
<tr>
<th>ID</th>
<th class="mdl-data-table__cell--non-numeric">Nome</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td class="mdl-data-table__cell--non-numeric">Nerdcast</td>
</tr>
</tbody>
</table>
The $result array have json data, here it is:
{"podcast":[{"id":"1","nome":"Dan Carlin is Hardcore History"},{"id":"2","nome":"Dose Extra"}]}
I have tried many ways, read and re-read so much posts here and other sites. I can't create a table.
I have also tried some plugins like DataTables.
It appears to be simple. lol.
How can I do it? Thanks.