What could be causing the PHP Fatal error: Class 'MySQLi' not found in this script?

The PHP Fatal error "Class 'MySQLi' not found" typically indicates that the MySQLi extension is not enabled in your PHP configuration. To solve this issue, you need to enable the MySQLi extension in your PHP configuration file (php.ini) by uncommenting or adding the line `extension=mysqli`.

<?php
// Enable MySQLi extension
extension=mysqli;

// Your PHP code using MySQLi
$mysqli = new mysqli("localhost", "username", "password", "database");

if ($mysqli->connect_error) {
    die("Connection failed: " . $mysqli->connect_error);
}

// Continue with your MySQLi queries
?>