What is the correct syntax for using the LIKE operator in a PHP SQL query?

When using the LIKE operator in a PHP SQL query, you need to ensure that the wildcard characters (%) are included correctly in the query string. The % symbol is used to represent any sequence of characters, so it should be placed before and/or after the search term within the LIKE operator. This allows for more flexible pattern matching when searching for specific values in a database column.

$search_term = 'example';
$query = "SELECT * FROM table_name WHERE column_name LIKE '%".$search_term."%'";
$result = mysqli_query($connection, $query);

// Process the result set as needed