How to pass array in URL? |
[eluser]NikhilSukul[/eluser]
Hi, I have a url which will be containing: controllername/functionname/param1/param2/param3/param4.. till param 7. I don't want to have a functionname with (param1,paramm2,.....param7), instead is it possible that i can have a functionname calling with paramArray, or no params, as then i will be able to get it from the url or then i can use $this->uri->segment_array() or something like that to get all the params? Please do reply me, i need this functionality urgently.
[eluser]rogierb[/eluser]
Typing your message took more time then using to search function would have Just a tip...
[eluser]tobben[/eluser]
You mean something like this? Code: <?php $this->uri->segments would return: Code: Array On a URL like http://dev/pages/lol/i/got/one/milllion/...r/here/omg to build it.. follow the link posted above
[eluser]NikhilSukul[/eluser]
Thanks, now it works for me like this i just need to create a function with a default param like Controller is blog function comments(array="") { array=$this->uri->segment_array(); } so the url can be http://baseurl/blog/comments/abc/xyz/test/dfdf/dfdfdff it will give me all the elements as array. thanks |
Welcome Guest, Not a member yet? Register Sign In |