Answers for "search if text 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

Browse Popular Code Answers by Language