Answers for "check if string have a substring php"

PHP
6

php find if string contains

if (strpos($string, 'substring') !== false) {
	// do stuff 
}
Posted by: Guest on August-25-2020
3

if text contains word then in php

if (strpos($haystack,$needle) !== false) {
    echo "$haystack contains $needle";
}
Posted by: Guest on July-16-2020

Code answers related to "check if string have a substring php"

Browse Popular Code Answers by Language