How can backticks be used to avoid conflicts with keywords in PHP MySQL queries?

When writing MySQL queries in PHP, it is common to use backticks (`) to wrap around table or column names. This is especially important when the names contain reserved keywords in MySQL, as it helps avoid conflicts and syntax errors. By using backticks, you can ensure that your queries are executed correctly even if they contain keywords. Example PHP code snippet:

// Example query using backticks to avoid conflicts with keywords
$query = "SELECT `name`, `email` FROM `users` WHERE `status` = 'active'";
$result = mysqli_query($connection, $query);

// Loop through the results
while ($row = mysqli_fetch_assoc($result)) {
    echo $row['name'] . " - " . $row['email'] . "<br>";
}