title: PHP: Parse Current URL
body: <p>I can catch current URL by <code>$_SERVER['REQUEST_URI']</code> which is <code>/mysitw/project/detail/fp/3</code> &amp; want to parse like</p>
  
  <pre><code>array(0=&gt;mysite, 1=&gt;project, 2=&gt;detail, 3=&gt;fp, 4=&gt;3)
  </code></pre>
  
  <p>and then easily search my required value using <code>in_array()</code> which I can do if could parse url successfully in an array</p>