How can you modify a PHP query to prevent it from retrieving entries that contain similar but not exact matches to a specified keyword?

When querying a database in PHP, you can modify the query to prevent retrieving entries that contain similar but not exact matches to a specified keyword by using the "LIKE" operator with wildcards. By using the "%" wildcard before and after the keyword, you can search for entries that contain the exact keyword without any additional characters before or after it. This will help filter out entries with similar but not exact matches to the specified keyword.

$keyword = "example";
$query = "SELECT * FROM table_name WHERE column_name LIKE '%$keyword%'";
// Execute the query and fetch results