PHP inserts strange symbols instead of polish letters
P粉189606269
P粉189606269 2024-02-26 19:48:29
0
1
378

When I use this code to insert data from mysql database it does not populate with polish letters but shows random weird symbols instead of polish letters Also this seems to be a problem with the database site but I am on utf8_polish_ci There it is: PHP displays symbols instead of letters

 $con=mysqli_connect("localhost","blank","blank","blank");
    if (mysqli_connect_errno())
    {
        echo "Nie Udało się połączyć z bazą danych: " . mysqli_connect_error();
    }

    $result = mysqli_query($con,"SELECT * FROM Delegacje");

    echo "<table>
<tr>
<th>Imię i Nazwisko</th>
<th>Data od</th>
<th>Data do</th>
<th>Miejsce wyjazdu</th>
<th>Miejsce przyjazdu</th>
</tr>";

    while($row = mysqli_fetch_array($result))
    {
        echo "<tr>";
        echo "<td>" . $row['Imie i Nazwisko'] . "</td>";
        echo "<td>" . $row['Data od'] . "</td>";
        echo "<td>" . $row['Data do'] . "</td>";
        echo "<td>" . $row['Miejsce wyjazdu'] . "</td>";
        echo "<td>" . $row['Miejsce przyjazdu'] . "</td>";
        echo "</tr>";
    }
    echo "</table>";

    mysqli_close($con);




P粉189606269
P粉189606269

reply all(1)
P粉441076405

Try opening the file in regular notepad and save as and selecting UTF-8 under encoding, that will also help.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!