Do not use preg_match()
if you only want to check if one string is contained in another string. Use strpos()
or strstr()
instead as they will be faster. (http://in2.php.net/preg_match)
if (strpos($text, 'string_name') !== false){
echo 'get the string';
}