title: I am getting array(0) in PHP yii2?
body: <p>I am getting array(0) as var_dump.</p>
  
  <pre><code>tbl_supplierOrderDetails['user_id']array(2) {
    ["tbl_supplierOrderDetails"]=&gt;
    array(0) {
    }
    ["tbl_userContactDetails"]=&gt;
    array(0) {
    }
  }
  </code></pre>
  
  <p>Here is my API example using php yii2</p>
  
  <pre><code> public function actionSuggestions()
      {   
          $listingId = Yii::$app-&gt;request-&gt;get('listing_id');
          $apiUrl = "http://example.com:8800/api/Home/view_supplierOrderDetails?listing_id=".$listingId;
          $suggestions = file_get_contents($apiUrl);
          $suggestions = json_decode($suggestions, JSON_PRETTY_PRINT);
          echo "tbl_supplierOrderDetails['user_id']";
          //print_r($suggestions);
          var_dump($suggestions);
           exit;
          return $this-&gt;render('suggestions' , array(
              'listingId' =&gt; $listingId,
              'suggestions' =&gt; $suggestions,
          ));
      }
  </code></pre>
  
  <p>here is my api demo in json format.</p>
  
  <pre><code> {
        "tbl_supplierOrderDetails": [
          {
            "num": 1,
            "user_id": 3496,
            "priority": "A.closed",
            "no_of_times": 5,
            "username": "eyuw",
            "company_name": "djff",
            "email": "abc@gmail.com",
            "contact_no": "9999999999",
            "origin": "abc",
            "dest": "xyz",
            "vehicle_class": "abc,
            "vehicle_type": "abc",
            "notes": "TCS_"
          }]
      "tbl_userContactDetails": [
          {
            "user_id": 500,
            "contact_name": "Mr abc",
            "contact_email": "abc@gmail.com",
            "contact_mobile": 9999999999,
            "contact_mobile2": null
          }]
      }
  </code></pre>
  
  <p>I want to display both this details in my html in different section . how can i do so by calling this api.</p>