codeigniter_tutorial
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CodeIgniter<br />
Regular Expressions<br />
Like wildcards, we can also use regular expressions in $route array key part. If any<br />
URI matches with regular expression, then it will be routed to the value part set into<br />
$route array.<br />
Example<br />
$route['products/([a-z]+)/(\d+)']='$1/id_$2';<br />
In the above example, a URI similar to products/shoes/123 would instead call the<br />
“shoes” controller class and the “id_123” method.<br />
18