title: How to get values from nested json in php
body: <p>I have this json file</p>
  <pre><code>{
  &quot;success&quot;: true,
  &quot;data&quot;: {
      &quot;total&quot;: &quot;2&quot;,
      &quot;returned&quot;: 2,
      &quot;start&quot;: 0,
      &quot;limit&quot;: 10,
      &quot;transactions&quot;: [
          {
              &quot;id&quot;: &quot;16393567&quot;,
              &quot;type&quot;: &quot;Credit&quot;,
              &quot;currency&quot;: &quot;BTC&quot;,
              &quot;amount&quot;: &quot;0.00019449&quot;,
              &quot;when&quot;: &quot;2021-09-03 10:27:48&quot;,
              &quot;rental&quot;: &quot;3411209&quot;,
              &quot;rig&quot;: &quot;205363&quot;,
              &quot;status&quot;: &quot;Pending&quot;,
              &quot;pending_seconds&quot;: &quot;716202&quot;
          },
          {
              &quot;id&quot;: &quot;16377905&quot;,
              &quot;type&quot;: &quot;Credit&quot;,
              &quot;currency&quot;: &quot;BTC&quot;,
              &quot;amount&quot;: &quot;0.00000203&quot;,
              &quot;when&quot;: &quot;2021-09-01 11:42:47&quot;,
              &quot;rental&quot;: &quot;3408621&quot;,
              &quot;rig&quot;: &quot;205363&quot;,
              &quot;status&quot;: &quot;Cleared&quot;,
              &quot;pending_seconds&quot;: 0
          }
      ]
  }
  </code></pre>
  <p>}</p>
  <p>I am able to get values under data with this code</p>
  <pre><code> $jsonCont = file_get_contents('temp.json');    
   $content = json_decode($jsonCont, true);
  
   $rig_detail= $content['data']['total'];
   $rig_detail= $content['data']['returned'];
   $rig_detail= $content['data']['start'];
   $rig_detail= $content['data']['limit'];
  </code></pre>
  <p>My problem exists where I try and get data from &quot;transactions&quot; I have tried</p>
  <pre><code> $rig_detail= $content['data']['transactions']['id'];
  </code></pre>
  <p>This however does not give me what I expected. What do I need to do to access the data within the transactions section?</p>