Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Check if a String Contains a Substring in PHP

phpCopy<?php
$mystring = "This is a PHP program.";

if (strpos($mystring, "PHP", 13) !== false) {
    echo("True");
} else {
    echo("False");
}
?>
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Check #String #Contains #Substring #PHP
ADD COMMENT
Topic
Name
4+1 =