I'm looking for a function that can allow me to look for a string within a string but has to be in between the ",".
Example:
Code: Select all
the_function("the long long long string", "long");
Example 2:
Code: Select all
$the_longstring = "this is the long string, that, has commas.";
$the_keyword = "that";
the_fonction($the_longstring, $the_keyword);
As you can see I'm going to make a search engine for my site and I need to be able to use the keywords (the input typed in the search bar) and the information in the keywords field in the database,each comma seperated, to allow it to work.
If there is any better way of doing this I'm allways open to suggestions.
Thanks and all help is appreciated.