Grab URL value... |
[eluser]woomacoder[/eluser]
Hello, I have a problem; I wanna grab a single part of url, for example: domain.com/index.php/controller-name/apple-iphone-3g-16gb-black-1 I wanna read in my controller-name, the 1 (ID) of url..., the latest item. But... i'dont now Sorry for my english. Thank you"
[eluser]Dam1an[/eluser]
If you split it up so each part of the item is a seperate URI segment, you can easily grab them using uri->segment In the current way, you can always get the second segment, which will return "apple-iphone-3g-16gb-black-1" and then explode on the '-' and assuming its always the last part, get the last item in the array
|
Welcome Guest, Not a member yet? Register Sign In |