i would like to know how to separate the url and take only the particular brand name from the url
http://www.example.com/mobiles/nokia-mobile-price-list.php
http://www.example.com/camera/canon-camera-price-list.php
I want to separate this url and take only the brand names such as
nokia , canon
$brand = "nokia";
$brand ="canon";
You can try
Output