Welcome Guest, Not a member yet? Register   Sign In
URL-Get Paramter will be automatically used as function-paramter
#1

[eluser]Unknown[/eluser]
Hi,
when I have an URL like: ../Controller/Function/paramValue
and the function in the controller accepts a parameter like
function Function($param = null) {
...

then the Parameter "paramValue" of the URL will be automatically used as the parameter for the function.
Is that correct?

Because I'm working with assocative parameters like: ../Controller/Function/paramName/paramValue and then the parameter in the function will be the paramName and not the paramValue.
#2

[eluser]PravinS[/eluser]
You don't need to write paramName, just use pramValue after function, it will be your function parameters.
#3

[eluser]Unknown[/eluser]
Great.
Even after using CI for a year now, I learn always something new :-)
#4

[eluser]InsiteFX[/eluser]
Here is something else to learn, use code tags.




Theme © iAndrew 2016 - Forum software by © MyBB