str_contains check for $ sign code example Example: php find if string contains if (strpos($string, 'substring') !== false) { // do stuff }