$db = mysqli_connect('host', 'dbUser', 'dbPassword', 'dbName');
$query = $db->query("SELECT * FROM `country`");
while($row = $query->fetch_assoc()) {
echo $row['id'] . '|' . $row['name'] . '
' . PHP_EOL;
}
// output
// 1|France
// 2|Russia
// 3|Italy
// 4|Spain
Comments
Post a Comment