title: How to access object in php
body: <p>i am accessing object property with following code </p>
  
  <pre><code>$address   = $_POST['address'];
  $balance = file_get_contents('https://block.io/api/v2/get_address_balance/?api_key=xxxx&amp;addresses='. $address);
          echo $balance-&gt;data-&gt;available_balance;
          Print_r($balance);
  </code></pre>
  
  <p>Actually i want to echo available_balance and output of print_r is this</p>
  
  <pre><code>{
    "status" : "success",
    "data" : {
      "network" : "BTC",
      "available_balance" : "0.00000000",
      "pending_received_balance" : "0.00000000",
      "balances" : [
        {
          "user_id" : null,
          "label" : null,
          "address" : "xxxxxxxxxxxxxxxxxxxxxxxxx",
          "available_balance" : "0.00000000",
          "pending_received_balance" : "0.00000000"
        }
      ]
    }
  </code></pre>
  
  <p>the next part of this question is please suggest me how to protect from SQl Injection Attack, in my project all forms are submitted through ajax, if user can sent only 20 requests to database in a day from one IP, is it will be good in SQL injection Protection.</p>