How to find if one string contains another string in PHP?
In PHP 8.0 a handy new function was added that allows you to determine if one string contains another substring. This is the str_contains function.
It is used like this:
<?php
str_contains('Hello World', 'Hello');
Returns true. If the string is not ...
webartisan.info1 min read