title: How to loop through JSON encoded info in a database and print out
body: <p>I have a form I've built in PHP and storing the form field values upon submission by the user in a MySQL database.  The form is extremely long and may change periodically.  So I used the json_encode functionality to store all the form values into the database.  Now I need pull that info out of the database and print it out in the key/value relationship.</p>
  
  <p>So for example, in the database, here's the row named "json_payload" with some example values in this format:</p>
  
  <pre><code>{"last_name":"Smith","first_name":"John","middle_name":"Doe"..."phone_number":"111.222.3333"}
  </code></pre>
  
  <p>I need to figure out how to loop through this row in the database and print out all the key/value relationships with PHP in a table format so the above example would end up looking like so:</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
  &lt;td&gt;Last Name&lt;/td&gt;
  &lt;td&gt;Smith&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;First Name&lt;/td&gt;
  &lt;td&gt;John&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Middle Name&lt;/td&gt;
  &lt;td&gt;Doe&lt;/td&gt;
  &lt;/tr&gt;
  ...
  &lt;tr&gt;
  &lt;td&gt;Phone Number&lt;/td&gt;
  &lt;td&gt;111.222.3333&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>