kee2ka4 Posted August 17, 2008 Share Posted August 17, 2008 Hi everyone, I want to collect two elements of the URL in a array that is, 1. the domain prefix after the domain name and 2. the name of the first subfolder. So for example if I have the domain name: www.sitename.co.uk/student, I want the collect the co.uk and student in a array. And for example if I have the domain name: www.sitename.com/teacher, in this case I want to collect com and teacher in a array. How can I implement this. Thanks, Ket Quote Link to comment Share on other sites More sharing options...
trq Posted August 17, 2008 Share Posted August 17, 2008 Take a look at parse_url() and explode() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.