I'm trying to read uft-8 unicode from my database onto my webpage.
Encoding (according to database): utf8_unicode_ci (using 000webhost)
contents of the fields: ! http://puu.sh/4DY1O.png As you can see the second cell contains an "é" at the end. When I read this out via SQL query I get this on my website: http://puu.sh/4DY4t.png
Here's the query I'm using:
// Create connection
$con = mysqli_connect("host","username","passwd","database");
// Database Connection Check
if (mysqli_connect_errno($con)) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
break;
}
// Print Ploegsamenstelling
// Print Spelers
$result = mysqli_query($con,"SELECT voornaam, naam FROM lowavolLeden WHERE ploeg_id='5' ORDER BY voornaam, naam");
while($row = mysqli_fetch_array($result)) {
echo "<dt>" . $row['voornaam'] . " " . $row['naam'] . "</dt>";
}
echo "<br />";
//Print Trainer
$result = mysqli_query($con,"SELECT voornaam, naam FROM lowavolTrainers WHERE ploeg_id='5'");
while($row = mysqli_fetch_array($result)) {
echo "<dt><strong>Trainster: </strong>" . $row['voornaam'] . " " . $row['naam'] . "</dt>";
}
// Close Connection
mysqli_close($con);
Thanks for the help!