I'll to explain my question: I have an string (url) and want to know wich searchengine it comes from.
the string is: "http://www.google.com/search?sourceid=n ... devnetwork"
and want php to let me know if string "google", "altavista" or something is in that string. How can i do that?
Do i have to use 'parse_str'? Or what? Switch/cases?
Please help me!
string contains string?
Moderator: General Moderators
I use strstr, or stristr for a case-insensitive version.
Code: Select all
$string1 = "my favourite search engine is GOOGLE, ovbiously!";
$string2 = "oogle";
if (stristr($string1,$string2)){
//yep, it found it.
}