title: Multidimensional array fetch using curl shows invalid argument in foreach
body: <p>I have an array like this which I fetch using file_get_content and here is other side url (<a href="http://sample.com/change.php%29code" rel="nofollow">http://sample.com/change.php)code</a> from where I fetch array.</p>
  
  <pre><code>$a=array();
  $a=Db::getInstance()-&gt;ExecuteS("SELECT *
  FROM tablename
  LIMIT 0 , 2
  ;");
  
  $a=(array)$a;
  print_r($a);
  </code></pre>
  
  <p>Then i use</p>
  
  <pre><code>$result = file_get_contents('http://sample.com/change.php');
  </code></pre>
  
  <p>That is the output of $result:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id_stock_available] =&gt; 1
              [id_product] =&gt; 1
              [id_product_attribute] =&gt; 0
              [id_shop] =&gt; 1
              [id_shop_group] =&gt; 0
              [quantity] =&gt; 3
              [depends_on_stock] =&gt; 0
              [out_of_stock] =&gt; 2
          )
  
      [1] =&gt; Array
          (
              [id_stock_available] =&gt; 2
              [id_product] =&gt; 2
              [id_product_attribute] =&gt; 0
              [id_shop] =&gt; 1
              [id_shop_group] =&gt; 0
              [quantity] =&gt; 1
              [depends_on_stock] =&gt; 0
              [out_of_stock] =&gt; 2
          )
  
  )
  </code></pre>
  
  <p>When I apply foreach for $result:</p>
  
  <pre><code>foreach ($result as $value) {
      var_dump($value);
      //var_dump($value['installed'];
  }
  </code></pre>
  
  <p>it shows me <code>Invalid argument supplied for foreach()</code>.</p>