How to separate the url and take one particular word
<p>i would like to know how to separate the url and take only the particular brand name from the url </p>

<pre><code>http://www.example.com/mobiles/nokia-mobile-price-list.php
http://www.example.com/camera/canon-camera-price-list.php
</code></pre>

<p>I want to separate this url and take only the brand names such as</p>

<blockquote>
  <p>nokia ,  canon</p>
</blockquote>

<pre><code>$brand = "nokia";
$brand ="canon";
</code></pre>
