Parsing a fancy URL to variables in PHP (/class/method/x/1/y/1/z/1/)
<p>I am sure someone has this done already, and was hoping someone could share some code.</p>

<p>We have the following .htaccess file in place:</p>

<pre><code>RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php
</code></pre>

<p>This is the same one Zend uses.  We are trying to emulate the same URL structure Zend does.  We would use Zend but we are way to far into our own framework.</p>

<p>What we want to accomplish is parse a url that looks like this:</p>

<pre><code>http://www.test.com/a/b/x/1/y/1/z/1
</code></pre>

<p>to this:</p>

<pre><code>$class = 'a';
$method = 'b';
$x = 1;
$y = 1;
$z = 'a';
</code></pre>

<p>I can code the final solution to determine strings from numerics, but was hoping someone had already done this and is willing to share.</p>
