My data.php file generates a json on the screen with the database's data, how could I get the generated json data and print it on a table for example?
Very simple. You can use: file_get_contents (or CURL) , json_decode and a foreach
For example, it looks like this:
<?php
$json = file_get_contents("dados.json");
$dados = json_decode($json, TRUE);
echo "<table>";
echo "<tbody>";
echo "<tr>";
echo "<td>ID</td>";
echo "<td>Empresa</td>";
echo "<td>Valor</td>";
echo "</tr>";
foreach ($dados as $info) {
echo "<tr>";
echo "<td>" . $info["id"] . "</td>";
echo "<td>" . $info["empresa"] . "</td>";
echo "<td>" . $info["valor"] . "</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
?>
You can either change the data.json in the script by the URL you entered or create a script to save it and use it as I did in the example.