What is the correct syntax for concatenation in the PHP code snippet provided for deleting records?

In the provided PHP code snippet for deleting records, the concatenation operator '.' is missing between the $table variable and the $id variable in the SQL query. To fix this issue, we need to correctly concatenate these two variables using the '.' operator to form a valid SQL query. Corrected PHP code snippet:

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database";
$table = "users";
$id = 1;

$conn = new mysqli($servername, $username, $password, $dbname);

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

$sql = "DELETE FROM " . $table . " WHERE id=" . $id;

if ($conn->query($sql) === TRUE) {
    echo "Record deleted successfully";
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();
?>