Extraing data from json array and separate according to type <p>So I am currently trying to extract information from a json array using <code>json_decode($result,true)</code>. The background here is that there is another php script getting information from a database and it is sending the data to me as <code>json_encoded</code> result.</p> <p>using <code>print_r($json)</code> i get the following</p> <pre><code>Array ( [result] =&gt; 1 [message] =&gt; Query Successful [data] =&gt; Query Output [0] =&gt; Array ( //Several values [test] =&gt; test [Example] =&gt; catcatcat [choice2] =&gt; B ) [1] =&gt; Array [test]=&gt; test //etc.... </code></pre> <p>I understand we can use a simple for loop to get some stuff to display or in this case I used</p> <pre><code>for($i=0;$i&lt;=count($json); $i++){ echo $json[$i]['test']; //etc etc } </code></pre> <p>and that will display the value. But what I cant figure out is how to send that to my HTML page as an output as a list. </p> <p>I am trying to get it to display as following</p> <ol> <li>Test catcatcat B</li> <li>Test etc etc</li> </ol> <p>--This may be a separate question but for me to learn I want to know if it's possible to actually break down the array and send to html as radio input and turn it into a value to choose from.</p>