title: Cakephp routing issue for passing parameters from URL
body: <p>For cakePHP routing, I understand that if you do</p>
  
  <pre><code>Router::connect(
      '/:controller/:id',
      array('action' =&gt; 'view'),
      array('id' =&gt; '[0-9]+')
  );
  </code></pre>
  
  <p>That would map to any urls that are <a href="http://www.mywebsite.com/controller/view/id" rel="nofollow">http://www.mywebsite.com/controller/view/id</a>,</p>
  
  <p>but how about mapping urls that are <a href="http://www.mywebsite.com/controller/id/action" rel="nofollow">http://www.mywebsite.com/controller/id/action</a>?</p>
  
  <p>For ex: <a href="http://www.mywebsite.com/classes/3/create/2" rel="nofollow">http://www.mywebsite.com/classes/3/create/2</a></p>
  
  <p>and in my create function in Classes controller,</p>
  
  <p>it will receive parameter $id, which is 3 in this case, and $count, which is 2 in this case,</p>
  
  <pre><code>public function create( $id, $count ) {
      ....
      // i can here create a total number of $count students
      // and assign them class_id $id
  
      // so  student1.class_id = 3
      // and student2.class_id = 3
  }
  </code></pre>
  
  <p>And I tried,</p>
  
  <pre><code>Router::connect(
  '/:controller/:id/:action',
      array('id' =&gt; '[0-9]+'),
      array('count' =&gt; '[0-9]{,2}')
  );
  </code></pre>
  
  <p>It didn't work for me.</p>