I have a problem, I have already coded everything with utf-8, I tried in many ways to sort this out and I can not, in a% of HTML, I pull a table from the database, but it returns with a symbol of special characters instead of the accents as in the picture below:
Thecodefor<option>
isthis
<selectid="modalidade" name="modalidade" class="form-control">
<?php
header("Content-type:text/html; charset=utf-8");
//require_once ('../model/Conexao.php');
//mysql_set_charset('utf8');
$sql = "SELECT * FROM modalidade";
$cnx = mysqli_connect("localhost", "root", "", "olimpiada");
$resultado = mysqli_query($cnx,$sql,MYSQLI_STORE_RESULT);
$qtde = mysqli_num_rows($resultado);
if($qtde>0)
{
while($linha = mysqli_fetch_array($resultado))
{
echo "<option value=".$linha['idModalidade'].">";
echo $linha['modalidade'];
echo "</option>";
}
}
?>
</select>
Here is the structure of the database
Thank you in advance