php if found in string code example Example: php find if string contains Click to copyif (strpos($string, 'substring') !== false) { // do stuff }