The problem isn't in displaying the data in the browser, because I tried the following and it worked perfectly:
<?php echo '<tag>Hello! My name is ženk!</tag>'; ?>
The problem isn't in saving the data in the database.
The problem is in retrieving this character from the database.
So you need to set the format to UTF-8 before querying the database:
$mysqli->query("SET NAMES 'utf8'");
$mysqli->query("SET CHARACTER SET utf8");
If you're using mysqli:
$mysqli = new mysqli($db_host, $db_user, $db_password, $db_name);
if(mysqli_connect_errno()){
printf("DB Connect failed: %s\n", mysqli_connect_error());
exit();
}
// Add the UTF-8 Support
$mysqli->query("SET NAMES 'utf8'");
$mysqli->query("SET CHARACTER SET utf8");
// Query the database
$mysqli->query("SELECT column FROM `table` ...");