$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
phpCopy<?php
$mystring = "This is a PHP program.";
if (strpos($mystring, "program.") !== false) {
echo("True");
}
?>
phpCopy<?php
$mystring = "This is a php program.";
$search = "a";
if(preg_match("/{$search}/i", $mystring)) {
echo "True"; } else {
echo("False");
}
?>
str_contains('STRING', 'SUB_STRING');
phpCopy<?php
$mystring = "This is a PHP program.";
if (strpos($mystring, "PHP", 13) !== false) {
echo("True");
} else {
echo("False");
}
?>
Code Example |
---|
Php :: use font awesome in laravel 8 |
Php :: read line by line php |
Php :: how can set defult value for yield in laravel |
Php :: cviebrock/eloquent-sluggable |
Php :: submonth carbon |
Php :: laravel drop foreign column |
Php :: how to get a sum of a column in lravel |
Php :: laravel target is not instantiable while building |
Php :: laravel observer |
Php :: custom rule laravel validation |
Php :: php check if associative array |
Php :: php 8 match |
Php :: end foreach loop |
Php :: laravel get current route url |
Php :: php curl add user agent |
Php :: laravel wheredate |
Php :: php connect strings |
Php :: docker : from php alpine |
Php :: Creating default object from empty value |
Php :: define int variable in php |
Php :: laravel fetch max value |
Php :: laravel form |
Php :: cambiare pagina php |
Php :: php decode json object |
Php :: static php |
Php :: php hello world program |
Php :: contact form 7 checkbox2 |
Php :: cors error angular php |
Php :: laravel create controller |
Php :: php quotations within quotations |