title: stdClass Object - split into table
body: <p>I am using the GoCardless API to create a subscription. I have created it and now trying to show the payments in a table. </p>
  
  <p>The API returns a stdClass Object with the upcoming payments in an array. How can I show these in a table?</p>
  
  <pre><code> $SUBS=$client-&gt;subscriptions()-&gt;get("$SUB");
  
  
   Subscription Class
  stdClass Object
  (
      [id] =&gt; SB00024BNFEEHX
      [created_at] =&gt; 2020-03-07T20:20:05.025Z
      [amount] =&gt; 5998
      [currency] =&gt; GBP
      [status] =&gt; active
      [name] =&gt; 
      [start_date] =&gt; 2020-03-12
      [end_date] =&gt; 
      [interval] =&gt; 1
      [interval_unit] =&gt; monthly
      [day_of_month] =&gt; 
      [month] =&gt; 
      [count] =&gt; 
      [metadata] =&gt; stdClass Object
          (
              [subscription_number] =&gt; 
          )
  
      [payment_reference] =&gt; 
      [upcoming_payments] =&gt; Array
          (
              [0] =&gt; stdClass Object
                  (
                      [charge_date] =&gt; 2020-03-12
                      [amount] =&gt; 5998
                  )
  
              [1] =&gt; stdClass Object
                  (
                      [charge_date] =&gt; 2020-04-14
                      [amount] =&gt; 5998
                  )
  
              [2] =&gt; stdClass Object
                  (
                      [charge_date] =&gt; 2020-05-12
                      [amount] =&gt; 5998
                  )
  
              [3] =&gt; stdClass Object
                  (
                      [charge_date] =&gt; 2020-06-12
                      [amount] =&gt; 5998
                  )
  </code></pre>
  
  <p>From other questions I have tried </p>
  
  <pre><code>$array = json_decode(json_encode($SUBS),true);
  echo"$array";
  </code></pre>
  
  <p>However this just displays/prints <code>Array</code></p>