URL Routing in PHP
<p>I'm doing a router, well with routes, part of my learning and wanted to see if my approach worked. Yet this been bothering me recently, see right now I'm adding the routes in an array, then adding them to a main "manager". </p>

<p>So I got (pseudo sample) to this approach </p>

<pre><code>&lt;?php 
$paths = array(); 

$paths[] = new routes_object('PATH', 
             array(
                'controller'=&gt; 'controllerName', 
                'action' =&gt; 'actionName')); 

$router = new router_manager()-&gt;add($paths);
</code></pre>

<p>After adding all the routes, means it would more than 10 or so. Then to see if they match I've to iterate through them and check the match() function to start the extract process to get variables. </p>

<p>Is it okay to take this approach? Having a collection of objects in a array and iterating?</p>
