After many attempts I couldn't get data from my database in a correct encoding (UTF-8) format.
This is my connection(config.php) file:
<?php
define("DB_HOST", "localhost");
define("DB_USER", "user");
define("DB_PASSWORD", "");
define("DB_DATABASE", "db");
$dbcon = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
?>
My php form for retriving data:
<?php
include('config.php');
$sqlget="SELECT * FROM table";
$sqldata= mysqli_query($dbcon, $sqlget) or die ('error');
mysqli_set_charset('utf8');
echo"<table>";
echo"</table";
?>
php mysqli utf8you would have wound the answer in the first result.