I am not good at doing preg_match().Can someone help me create a preg_match() to retrieve that last parameter in the url.
PHP Code:
$url = "http://my.example.com/getThis";
$patern = ""; //need to create this
$result = preg_match($pattern, $url, $matches);
Thank you!
Answers of Muhammad Abrar Istiadi and AD7six are better ways to do the job than this and I strongly suggest using explode,
But to answer your question: