I have been trying to match my one variable with the other. All I want that variable let's say $word
contains no matter what in it matches with the the other variable lets say $search_in
and echo results accordingly.
I have been using if (preg_match("/$word/i", $search_in)) echo "matches";
but I am getting a lot of warnings like the following as I applied regexp on the values being returned from DB.
Warning: preg_match() [function.preg-match]: Unknown modifier '('
Warning: preg_match() [function.preg-match]: Unknown modifier 'T'