Horje
if part of stringp ph Code Example
if part of stringp ph
$a = 'How are you?';

if (strpos($a, 'are') !== false) {
    echo 'true';
}
strpos in php

<?php
$mystring = 'abc';
$findme   = 'a';
$pos = strpos($mystring, $findme);

// Note our use of ===.  Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos === false) {
    echo "The string '$findme' was not found in the string '$mystring'";
} else {
    echo "The string '$findme' was found in the string '$mystring'";
    echo " and exists at position $pos";
}
?>

Source: www.php.net




Php

Related
laravel 8 delete by id Code Example laravel 8 delete by id Code Example
How do I check if a string contains a specific word php Code Example How do I check if a string contains a specific word php Code Example
carbon add minutes Code Example carbon add minutes Code Example
dump all variables twig Code Example dump all variables twig Code Example
orberby laravel Code Example orberby laravel Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7