User guide possible mistake - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: User guide possible mistake (/showthread.php?tid=29692) |
User guide possible mistake - El Forum - 04-18-2010 [eluser]adaxa[/eluser] I would like to alert you that that there might be a mistake in the user guide (URI Routing). Code: $route['product/(:num)'] = "catalog/product_lookup_by_id/$1"; Quote:A URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup_by_id" method passing in the match as a variable to the function. I think only numeric values will be match in second segment. User guide possible mistake - El Forum - 04-18-2010 [eluser]pickupman[/eluser] Depends on the context on how you read it. You are right :num would be anything numeric, but that's what is shown the paragraph above it. [quote] :num will match a segment containing only numbers. :any will match a segment containing any character. [quote] |