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 \
$url = " www.domain.com/car/audi/"; if (strpos($url, "car")!==false){ echo "Car here"; } else { echo "No car here :("; }
See strpos manual