How does PDO in PHP allow for the use of associative identifiers in prepared statements compared to mysqli?

PDO in PHP allows for the use of associative identifiers in prepared statements by using named placeholders in the SQL query. This makes the code more readable and maintainable compared to using question marks as placeholders in mysqli. With PDO, you can bind parameter values to named placeholders using the `bindValue()` method.

// PDO example using named placeholders for prepared statements
$pdo = new PDO("mysql:host=localhost;dbname=myDB", $username, $password);

$stmt = $pdo->prepare("SELECT * FROM users WHERE username = :username");
$stmt->bindValue(':username', $username);
$stmt->execute();

// Fetch results
while ($row = $stmt->fetch()) {
    // Process the results
}