web-profile

php check if string contains substring

strpos:

if( strpos( $string, $substring ) === false ) { // substring not found in string
	// code
} else { // substring found in string
	// code
}

Leave a Reply

Your email address will not be published.