Answers for "search string into nother string in php"

PHP
5

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
-1

check if string contains substring php 8

str_contains('STRING', 'SUB_STRING');
Posted by: Guest on December-06-2020

Browse Popular Code Answers by Language