Answers for "function to check in php to search for a substring in a string"

PHP
8

how to check if a string contains a substring in php

$a = 'How are you?';

if (strpos($a, 'are') !== false) {
    echo 'true';
}
Posted by: Guest on October-18-2020

Code answers related to "function to check in php to search for a substring in a string"

Browse Popular Code Answers by Language