SOLVED: Can't Use "new" as function name? |
[eluser]Joakim_[/eluser]
Hi first let me say I'm a CL newbie and this might be a stupid question, but: I try to create a function called called "new" but it wont work. When I change the name it works. I couldn't find the word in the reserved words list. If it is reserved, can I use a different name for the URL? Let's say I create a function called new_item but I have the URL to say /new/? Thank you a lot for your help! ![]()
[eluser]MrEnirO[/eluser]
Quote:Let’s say I create a function called new_item but I have the URL to say /new/?You can use remap function: http://ellislab.com/codeigniter/user-gui...#remapping
[eluser]xwero[/eluser]
No chance maning a function with the word new. I tried to do the same with do but i got no luck either. php reserved words
[eluser]Joakim_[/eluser]
[quote author="Michael Wales" date="1213369350"]URI Routing[/quote] Awesome, thanks! That solved the problem! ![]() Code: $route['items/new'] = "items/new_item"; |
Welcome Guest, Not a member yet? Register Sign In |