Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

string contains string laravel

// **** 1
$str = "Hello World!";
// String contains the given value
$contains = str_contains($str, 'World');
// Array of values
$contains = str_contains($str, ['Hi', 'World']);
// **** 2
use IlluminateSupportStr;
   
$str = "Hello World!";   
$contains = Str::contains($str, 'World');
 
PREVIOUS NEXT
Tagged: #string #string #laravel
ADD COMMENT
Topic
Name
9+7 =