here is my problem, i have an arabic database mysqli UTF8_general_ci and the charset of my php file is UTF-8
when i seled data i get "?????????????".
on php my admin i can write and read with no problem, also on php i can, but the problem is when is when i get data from the database! here is my code:
<meta charset="UTF-8"/>
$connexion = new mysqli(HOST_DB,USER_DB,MDP_DB,DB_NAME);
if ($connexion->error) {
die('Une erreur s\'est produite :' .$connexion->error);
}
else{
$sql = "SELECT nom, description, date, formateur, image, prix, lieux FROM news";
if ($result = mysqli_query($connexion,$sql)) {
while ($ligne = mysqli_fetch_assoc($result)) {
echo'
<ul>
<li><figure>
<figcaption>
<h1>'.$ligne["nom"].'</h1>
<p>'.$ligne["description"].'</p>
<strong>اليوم:'.$ligne["date"].'</strong><br/>
<strong>المكان:'.$ligne["lieux"].'</strong><br/>
<strong>المدرس:'.$ligne["formateur"].'</strong><br/>
<strong>الثمن: '.$ligne["prix"].'دينار</strong>
</figcaption>
<img src="Images/'.$ligne["image"].'" height="250px" width="250px">
</figure></li>
</ul>
';
}
}
}