If I search for tOm ArNfElD and the $variable is “Tom Arnfeld”, I get great results form LIKE in MySQL (which is case-insensitive).
How could I wrap the matched text in the $variable with a <span></span> to highlight to what part of the search matched the query? I need to retain the original case of the $variable.
this might help