Answers for "how check if string contains another string with regex php"

PHP
8

check if a string contains a substring php

$a = 'How are you?';

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

Code answers related to "how check if string contains another string with regex php"

Browse Popular Code Answers by Language