removing related urls from array

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
someguyhere
Forum Contributor
Posts: 181
Joined: Sun Jul 27, 2008 3:24 pm

removing related urls from array

Post by someguyhere »

I have an array that contains a list of urls, one may be the root domain, another may be a subfolder. I've already implemented array_unique() to wipe out exact matches, but I can't find out how to remove items that fall into this criteria. If it makes a difference, I would prefer to drop the root and keep the subfolder.
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: removing related urls from array

Post by JakeJ »

Take a look at this tutorial on preg_match()
http://www.tipsntutorials.com/tutorials/PHP/50
Post Reply