title: Get specific data from the array
body: <p>Since I'm really unexperienced with PHP, I'm having trouble retrieving specific data from the following array that I receive via API: </p>
  
  <p>I need the values of </p>
  
  <ul>
  <li>'id'</li>
  <li>'amount' </li>
  <li>'statsTags'</li>
  </ul>
  
  <p>Unfortunatly the following code retrieves an undefined index error: </p>
  
  <pre><code>echo $commissions['TPerformant\API\Model\Commission::__set_state']['id'];
  </code></pre>
  
  <p>This is the content of the <code>var_dump</code></p>
  
  <p><code>var_dump($commissions)</code>: </p>
  
  <pre><code>array (
    0 =&gt; 
    TPerformant\API\Model\Commission::__set_state(array(
       'id' =&gt; 457171,
       'userId' =&gt; 8917,
       'actionid' =&gt; 456657,
       'actiontype' =&gt; 'sale',
       'amount' =&gt; '0.31',
       'status' =&gt; 'pending',
       'affrequestId' =&gt; NULL,
       'description' =&gt; 'cosmetics|Mascara Extra Super Lash Curved Brush  8 mlx1 (7% from 6.66), cosmetics|Sampon uscat Blush Dry  50 mlx1 (7% from 8.33), cosmetics|Crema de maini si corp cu Lavandax1 (7% from 4.99)',
       'createdAt' =&gt; '2016-12-24T16:48:07Z',
       'updatedAt' =&gt; '2016-12-24T16:48:07Z',
       'reason' =&gt; NULL,
       'statsTags' =&gt; ',undefinedDesktopnulla60949bd-0b06-4fd6-a324-0d65351c10e9,',
       'history' =&gt; NULL,
       'currency' =&gt; 'EUR',
       'workingCurrencyCode' =&gt; 'RON',
       'programId' =&gt; 882,
       'amountInWorkingCurrency' =&gt; '1.4',
       'program' =&gt; 
      TPerformant\API\Model\AffiliateProgram::__set_state(array(
         'affrequest' =&gt; NULL,
         'id' =&gt; NULL,
         'slug' =&gt; 'elefant-ro',
         'name' =&gt; 'elefant.ro ',
         'mainUrl' =&gt; NULL,
         'baseUrl' =&gt; NULL,
         'description' =&gt; NULL,
         'activatedAt' =&gt; NULL,
         'userId' =&gt; NULL,
         'uniqueCode' =&gt; NULL,
         'status' =&gt; NULL,
         'cookieLife' =&gt; NULL,
         'tos' =&gt; NULL,
         'productFeedsCount' =&gt; NULL,
         'productsCount' =&gt; NULL,
         'bannersCount' =&gt; NULL,
         'approvalTime' =&gt; NULL,
         'currency' =&gt; NULL,
         'enableLeads' =&gt; NULL,
         'enableSales' =&gt; NULL,
         'defaultLeadCommissionRate' =&gt; NULL,
         'defaultLeadCommissionType' =&gt; NULL,
         'defaultSaleCommissionRate' =&gt; NULL,
         'defaultSaleCommissionType' =&gt; NULL,
         'approvedCommissionCountRate' =&gt; NULL,
         'approvedCommissionAmountRate' =&gt; NULL,
         'paymentType' =&gt; 'postpaid',
         'balanceIndicator' =&gt; NULL,
         'downtime' =&gt; NULL,
         'averagePaymentTime' =&gt; NULL,
         'logoId' =&gt; NULL,
         'logoPath' =&gt; NULL,
         'userLogin' =&gt; 'elefant',
         'category' =&gt; NULL,
         'countries' =&gt; NULL,
         'ignoreIPs' =&gt; NULL,
         'requester' =&gt; 
        TPerformant\API\HTTP\Affiliate::__set_state(array(
           'accessToken' =&gt; 
          array (
            0 =&gt; 'notrelevant',
          ),
           'clientToken' =&gt; 
          array (
            0 =&gt; 'notrelevant',
          ),
           'uid' =&gt; 
          array (
            0 =&gt; 'notrelevant',
          ),
           'userData' =&gt; 
          TPerformant\API\Model\Affiliate::__set_state(array(
             'id' =&gt; 8917,
             'email' =&gt; 'notrelevant',
             'login' =&gt; 'notrelevant',
             'name' =&gt; 'notrelevant',
             'role' =&gt; 'affiliate',
             'uniqueCode' =&gt; 'notrelevant',
             'createdAt' =&gt; '2012-04-17T10:25:11Z',
             'avatarUrl' =&gt; 'https://secure.gravatar.com/avatar/2aa7cbeda20ce7dee64a2764004ef7b5?d=https://network.2performant.com%2Fimg%2Favatar-default.jpg',
             'newsletterSubscription' =&gt; true,
             'userInfo' =&gt; 
            stdClass::__set_state(array(
               'address' =&gt; 'Bucuresti',
               'city' =&gt; 'Bucuresti',
               'country' =&gt; 'Romania',
               'display_name' =&gt; 'regular',
               'firstname' =&gt; 'Andrei',
               'lastname' =&gt; 'Ioniță',
               'organization' =&gt; '',
               'phone' =&gt; '',
               'state' =&gt; 'Bucuresti',
               'typeofbusiness' =&gt; '',
            )),
             'requester' =&gt; NULL,
          )),
        )),
      )),
       'publicActionData' =&gt; 
      stdClass::__set_state(array(
         'created_at' =&gt; '2016-12-24T16:48:07Z',
         'updated_at' =&gt; '2016-12-24T16:48:07Z',
         'rate' =&gt; '7.0',
         'amount' =&gt; '4.41',
         'ad_type' =&gt; 'quicklink',
         'ad_id' =&gt; '882',
         'source_ip' =&gt; '109.99.30.73',
         'description' =&gt; 'cosmetics|Mascara Extra Super Lash Curved Brush  8 mlx1 (7% from 6.66), cosmetics|Sampon uscat Blush Dry  50 mlx1 (7% from 8.33), cosmetics|Crema de maini si corp cu Lavandax1 (7% from 4.99)',
         'working_currency_code' =&gt; 'RON',
         'amount_in_working_currency' =&gt; '19.98',
      )),
       'publicClickData' =&gt; 
      stdClass::__set_state(array(
         'created_at' =&gt; '2016-12-24T16:13:20Z',
         'source_ip' =&gt; '109.99.30.73',
         'url' =&gt; 'https://www.maller.ro/voucher-elefant-ro-40-reducere/',
         'redirect_to' =&gt; 'http://www.elefant.ro/oferte-speciale#utm_source=2parale&amp;utm_medium=Campaign&amp;utm_campaign=2c42f3c4e',
         'stats_tags' =&gt; ',undefinedDesktopnulla60949bd-0b06-4fd6-a324-0d65351c10e9,',
      )),
       'requester' =&gt; 
      TPerformant\API\HTTP\Affiliate::__set_state(array(
         'accessToken' =&gt; 
        array (
          0 =&gt; 'notrelevant',
        ),
         'clientToken' =&gt; 
        array (
          0 =&gt; 'notrelevant',
        ),
         'uid' =&gt; 
        array (
          0 =&gt; 'notrelevant',
        ),
         'userData' =&gt; 
        TPerformant\API\Model\Affiliate::__set_state(array(
           'id' =&gt; 8917,
           'email' =&gt; 'notrelevant',
           'login' =&gt; 'notrelevant',
           'name' =&gt; 'Andrei Ioniță',
           'role' =&gt; 'affiliate',
           'uniqueCode' =&gt; 'notrelevant',
           'createdAt' =&gt; '2012-04-17T10:25:11Z',
           'avatarUrl' =&gt; 'https://secure.gravatar.com/avatar/2aa7cbeda20ce7dee64a2764004ef7b5?d=https://network.2performant.com%2Fimg%2Favatar-default.jpg',
           'newsletterSubscription' =&gt; true,
           'userInfo' =&gt; 
          stdClass::__set_state(array(
             'address' =&gt; 'Bucuresti',
             'city' =&gt; 'Bucuresti',
             'country' =&gt; 'Romania',
             'display_name' =&gt; 'regular',
             'firstname' =&gt; 'Andrei',
             'lastname' =&gt; 'Ioniță',
             'organization' =&gt; '',
             'phone' =&gt; '',
             'state' =&gt; 'Bucuresti',
             'typeofbusiness' =&gt; '',
          )),
           'requester' =&gt; NULL,
        )),
      )),
    )),
  </code></pre>