title: Parsing JSON output to HTML Table
body: <p>I have some problem to parse my json file to html table
  this is url json file </p>
  
  <p><a href="https://sicantikws.layanan.go.id/api/TemplateData/keluaran/15141.json" rel="nofollow noreferrer">https://sicantikws.layanan.go.id/api/TemplateData/keluaran/15141.json</a></p>
  
  <p>i want to ask how to solved this problem, i wrote a code like this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
   $url = 'https://sicantikws.layanan.go.id/api/TemplateData/keluaran/15141.json';
   $response = file_get_contents($url);
   $responseArray = json_decode($response, true);
  ?&gt;
  &lt;?php if($responseArray['success'] === 'true'|['message'] === ''): ?&gt;
  &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
          &lt;?php foreach($headers as $h): ?&gt;
              &lt;th&gt;&lt;?php echo $h; ?&gt;&lt;/th&gt;
          &lt;?php endforeach; ?&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;?php foreach($responseArray['data'] as $row): ?&gt;
          &lt;tr&gt;
              &lt;?php foreach($row as $value); ?&gt;
                  &lt;td&gt;&lt;?php echo $value; ?&gt;&lt;/td&gt;
              &lt;?php endforeach; ?&gt;
          &lt;/tr&gt;
          &lt;?php endforeach; ?&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;?php endif; ?&gt;</code></pre>
  </div>
  </div>
  </p>