RealImmortal2004
Coder
The code below is what I've tried but I can't get it to display an actual html table and have the form be on a different page.
PHP:
<?php
$json = file_get_contents('data.json');
$data = json_decode($json, true);
$url = $_POST['url'];
echo '<table>';
echo '<thead><tr><th>Name</th><th>Link</th></tr></thead>';
echo '<tbody>';
foreach ($data as $item) {
echo '<tr>';
echo '<td>' . $item['name'] . '</td>';
echo '<td><a href="' . $url . $item['link'] . '">' . $item['link'] . '</a></td>';
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
?>