title: json_decode() function returning nothing
body: <p>I am trying to retrieve json data into a php array and giving me the error on foreach() loop
  Json Data is as given bellow:</p>
  
  <pre><code>{"_id":{"$oid":"59043fcee557e6ad53662ed5"},"url":"http://farm3.staticflickr.com/2893/34203321321_f9a2ff200b_b.jpg","asc":0,"id":1}
  {"_id":{"$oid":"59043fcee557e6ad53662ed6"},"url":"http://farm3.staticflickr.com/2840/34175955132_ab92628fb3_b.jpg","asc":1,"id":1}
  </code></pre>
  
  <p>And the code I used for:</p>
  
  <pre><code>$file="jsonfile.json";
  $jsondata=file_get_contents($file);
  $data=json_decode($jsondata,true);
  print_r ($data);
  foreach($data as $row){
  $insql ="INSERT INTO mysqltable(Nurl,Nid,sort) 
  VALUES('".$row["url"]."','".$row["id"]."','".$row["asc"]."')";
  echo "$insql";
  mysql_query($dbconnect,$insql);
  print_r ($data);
  }
  </code></pre>
  
  <p>Above returning me the bellow error:
  Any help will be highly appreciated.</p>
  
  <pre><code>Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\a\json\index2.php on line 15
  </code></pre>