Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How do I check if a string contains a specific word?

$haystack = 'How are you?';
$needle   = 'are';

if (strpos($haystack, $needle) !== false) {
    echo 'true';
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #check #string #specific
ADD COMMENT
Topic
Name
8+1 =