APK errors

In PHP the letter ə becomes a question mark

Two places are separate. The page has to say what it sends to the browser. The database connection has to say how it writes the text.

Without the header the browser may read the page with the system table. Without charset on the connection MySQL may treat the text as latin1. On both paths ə becomes ?.

The file itself must be saved as UTF-8. A PHP header does not repair the bytes inside the file.

<?php
header("Content-Type: text/html; charset=utf-8");
$baglanti = new PDO(
    "mysql:host=127.0.0.1;dbname=magaza;charset=utf8mb4",
    "root",
    ""
);
echo "Azərbaycan";