Answers for "php array find string"

PHP
1

find in php string or

$a = 'How are you?';

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

php find part of string in array

foreach($array as $item){
  if(strpos($item,"mysearchword")!== false){
    echo 'found';
  }
}
Posted by: Guest on May-05-2021

Browse Popular Code Answers by Language