Answers for "how to check if a string equals another string php"

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
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 to check if a string equals another string php"

Browse Popular Code Answers by Language