I have imported 17 thousand lines of data into an SQL database via phpmyadmin running with Apache2 on Ubuntu Server 18.04.
When trying to display the data with PHP on my localhost website, UFT-8 symbols won't show properly.
I'm doing this:
$conn = mysqli_connect($servername, $username, $password, 'Drinks');
$sql = "SELECT * FROM drinks LIMIT 10";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
echo "<tr><th>" . $row["Name"]. "</th></tr>";
}
My database table is set to utf8mb4_general_ci
and all rows are imported with INSERT
.
My website head in my index.php is set to <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
and i've also tried <meta charset="UTF-8">
.
All symbols ARE showing correctly in phpmyadmin. Why won't they show on my website?
Thank you!