Welcome Guest, Not a member yet? Register   Sign In
Grab URL value...


I have a problem; I wanna grab a single part of url, for example:


I wanna read in my controller-name, the 1 (ID) of url..., the latest item.
But... i'dont now Sad

Sorry for my english.
Thank you"

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

Yes, it's a good solution! Thank you damian Wink

Theme © iAndrew 2016 - Forum software by © MyBB