title: Mysqli can't insert multiple rows
body: <pre><code>$allgames = file_get_contents("https://steamspy.com/api.php?request=all");
  $decodeall = json_decode($allgames, true);
  foreach($decodeall as $game) {
  
  
  
  $sql = "INSERT INTO games (name)
  VALUES ('{$game['name']}')";
  
  }
  
  if ($conn-&gt;multi_query($sql) === TRUE) {
      echo "New records created successfully";
  } else {
      echo "Error: " . $sql . "&lt;br&gt;" . $conn-&gt;error;
  }
  
  $conn-&gt;close();
  </code></pre>
  
  <p>When i do this only the first row will be added. How do i insert multiple rows? </p>