# if 'hello' not contained in $string if ( index($string, 'hello' ) == -1) { # do something }