Hi there, hope all doing well.
Im trying to split a url and return the just the path including parameters (not the domain name) - and store it as a variable.
Thus for example my domain is: www.mydomain.com/pathone/path2/product.cfm?p=176
and I'd like to return:
$path = /pathone/path2/product.cfm?p=176
----------------------------------------------
Currently I'm using:
$Product_URL = www.mydomain.com/pathone/path2/product.cfm?p=176
$path = parse_url($Product_URL, PHP_URL_PATH);
----------------------------------------------
but if I echo $path I just get: /pathone/path2/product.cfm
Anyone got any ideas?
Many Thanks