Answers for "check if string is present php"

PHP
2

php chech if string contains

$a = 'How are you?';

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

if exists in string php

if (strpos($search, ' -') !== false) {
  echo 'There is exclude pattern "-" in search expression';
}
Posted by: Guest on March-02-2022

Code answers related to "check if string is present php"

Browse Popular Code Answers by Language