I am trying to get matched parts by comparing
$_SERVER['DOCUMENT_ROOT'] and $_SERVER['PHP_SELF'];
Like if $_SERVER['DOCUMENT_ROOT'] returned: var/www/subdir
and $_SERVER['PHP_SELF']; returned /subdir/index.php/somepage
so how do i match $_SERVER['DOCUMENT_ROOT'] from right
and $_SERVER['PHP_SELF']; from left and then get the matched part
So that I will get this in output:
subdir
Thanks for help