PHP - url question
<p>How can I turn example 1 into example 2 using PHP</p>

<p>Example 1</p>

<pre><code>http://www.example.com/categories/fruit/apple/green
</code></pre>

<p>Example 2</p>

<pre><code>http://www.example.com/categories/index.php?cat=fruit&amp;sub1=apple&amp;sub2=green
</code></pre>
