how to take the url to became a variable |
[eluser]jedd[/eluser]
You could, and arguably should, instead just do this: Code: function choose_testi ( $id = 0 ) With your cited URL of : http://localhost/ci2/adminpage/choose_testi/4 , the variable $id gets a value of 4. If your URL has no number after 'choose_testi' then $id is set to 0. EDIT: Accidentally left the urisegment assign in there .. whoops! |
Messages In This Thread |
how to take the url to became a variable - by El Forum - 03-31-2009, 08:17 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 08:20 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 08:48 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 09:30 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 09:35 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 09:56 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:00 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:04 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:05 PM
how to take the url to became a variable - by El Forum - 03-31-2009, 10:09 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 01:23 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:11 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:28 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:36 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:45 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:55 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 07:09 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 07:14 AM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:33 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 06:40 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 07:36 PM
how to take the url to became a variable - by El Forum - 04-01-2009, 08:25 PM
|