What is the purpose of using stristr in a mysqli query?

When using a mysqli query in PHP, the stristr function can be used to perform a case-insensitive search within a string. This can be useful when you want to search for a specific value in a database column without being concerned about the case of the letters. By using stristr in your mysqli query, you can ensure that the search is not case-sensitive and retrieve the desired results regardless of the letter case.

$search_term = "example"; // Term to search for
$query = "SELECT * FROM table WHERE stristr(column_name, '$search_term') !== false";
$result = mysqli_query($connection, $query);

// Loop through the results
while($row = mysqli_fetch_assoc($result)) {
    // Process the retrieved data
}