Skip to content

Instantly share code, notes, and snippets.

@melice
Created October 16, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melice/7d19e649bbb1fe9ffaba to your computer and use it in GitHub Desktop.
Save melice/7d19e649bbb1fe9ffaba to your computer and use it in GitHub Desktop.
<?php
$handle = fopen("http://www.youseeme.com/bi/m/api/save/todata3.json", "rb");
$result = stream_get_contents($handle);
fclose($handle);
$data = json_decode($result, true);
$keys = array_keys($data[0]);
echo '<table class="dataintable">';
echo "<tr>";
foreach ($keys as $k)
{
echo "<th> $k </th>";
}
echo "</tr>";
foreach ($data as $d)
{
echo "<tr>";
foreach ($keys as $k)
{
echo "<td> ".$d[$k]." </td>";
}
echo "</tr>";
}
echo "</table>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment