When I execute SELECT
query in php in order to get data from MySQL DB into bootstrap table, the apostrophes are not displayed correctly in the table rows. In particular, I get Gr�a
instead of Grúa
.
This is how I get data from MySQL DB:
<?php
include_once 'include/connect_db.php';
$query = "SELECT * FROM myTable;";
$result = ejecutar_query($query);
$list = array();
while ($b = mysqli_fetch_array($result)) {
$list[] = $b;
}
?>
<td><?php echo $row['name'];?></td>
<!--jQuery Datatable-->
<script>
$(document).ready(function(){
$('#myTable').dataTable({
"sPaginationType":"full_numbers",
"aaSorting":[[0, "asc"]],
"bJQueryUI":true
});
hideLoading();
});
</script>
Should I change the encoding in MySQL DB or what should I do to solve this issue?