If URL contains X, Then do this in PHP

You can customise the code of your website using this function in PHP:

<?php if (stripos($_SERVER[‘REQUEST_URI’],’/current-page/’) !== false) {echo ‘class=”selected”‘;} ?>

or to check if the URL = something:

$urllow = $_SERVER['SCRIPT_URI'];
$urllow = strtolower($urllow);
if ((strpos($urllow,"search-text"))){
do something...
}

EG: showing a different header on a page etc