Welcome Guest, Not a member yet? Register   Sign In
uri->segment(0) return FALSE in _remap function
#2

[eluser]llbbl[/eluser]
"someParameter" would be the 3rd segment of the URI.

http://ellislab.com/codeigniter/user-gui...s/uri.html

http://example.com/index.php/news/local/...rime_is_up

The segment numbers would be this:

1. news
2. local
3. metro
4. crime_is_up

By default the function returns FALSE (boolean) if the segment does not exist. There is an optional second parameter that permits you to set your own default value if the segment is missing. For example, this would tell the function to return the number zero in the event of failure:

$product_id = $this->uri->segment(3, 0);


Messages In This Thread
uri->segment(0) return FALSE in _remap function - by El Forum - 08-19-2008, 09:54 AM
uri->segment(0) return FALSE in _remap function - by El Forum - 08-19-2008, 10:51 AM
uri->segment(0) return FALSE in _remap function - by El Forum - 08-19-2008, 11:05 AM
uri->segment(0) return FALSE in _remap function - by El Forum - 08-19-2008, 04:38 PM
uri->segment(0) return FALSE in _remap function - by El Forum - 08-19-2008, 09:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB