title: how to read json file into a php array and plot a graph by using this array?
body: <p>i am able to read a json file into an array and display the output but i want to use that array directly to give it as a input to another php function to plot a graph,</p>
  
  <p>how to read json file into a php array and plot a graph by using this array ?</p>
  
  <pre><code>       &lt;?php
           $string = file_get_contents("json.json");
         $example_data=json_decode($string,true);
  
         foreach ($example_data as $k =&gt; $v) {
          echo $k, ' : ', $v;
          }
          ?&gt;
  </code></pre>
  
  <p>but instead of displaying it as an output text, i want to give this example_data as an input array to another php function,</p>
  
  <p>in the above code, instead of declaring the example_data, i want to read it from another json file as i did in the first code, can anyone give me a solution to this ?</p>