I would like to know if some word is present in the URL.
For example, if word car is in the URL, like www.domain.com/car/ or www.domain.com/car/audi/ it would echo \
Starting with PHP 8 (2020-11-24), you can use str_contains:
if (str_contains('www.domain.com/car/', 'car')) { echo 'car is exist'; } else { echo 'no cars'; }