Answers for "if string has specific string php8"

PHP
2

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

$a = 'How are you?';

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

check if string contains substring php 8

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

Code answers related to "if string has specific string php8"

Browse Popular Code Answers by Language