User guide possible mistake

#1
[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.

#2
[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]


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.