while($row = $result->fetch_array(MYSQLI_ASSOC)) { printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]); }