How can wildcards be effectively used in a PHP search query to find a specific term within a string?

When searching for a specific term within a string in PHP, wildcards can be effectively used to match patterns rather than exact matches. One common wildcard character is the '%' symbol, which can be used in conjunction with the LIKE operator in SQL queries to find strings that contain a certain term. By using wildcards, you can search for variations of a term within a larger string, making your search query more flexible and robust.

$searchTerm = 'example';
$query = "SELECT * FROM table WHERE column LIKE '%$searchTerm%'";
// Execute the query and fetch results