Hi My string is something like this: editProduct.php?catid=86&productid=1045 From all this, I need to remove everything except 86. Anyone can help me to do this? I am comming from ASP world, and I need help to do this in PHP Thanks in advance Zoreli
$string = 'editProduct.php?catid=86&productid=1045'; parse_str($string, $parts); echo $parts['catid']; PHP: www.php.net/parse_str
Hm $string = 'editProduct.php?catid=86&productid=1045'; parse_str(end(explode('?', $string)), $parts); echo $parts['catid']; PHP: