If I have a URL look like this:
http://wwww.example/test1/test2/test3/
How can I retrieve string test3
from the url above?
$str = explode("/","http://wwww.example/test1/test2/test3/");
echo $str[count($str)-2];
DEMO: https://eval.in/83914
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With