Page 1 of 1

removing related urls from array

Posted: Sat Feb 13, 2010 2:09 pm
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.

Re: removing related urls from array

Posted: Sat Feb 13, 2010 8:49 pm
by JakeJ
Take a look at this tutorial on preg_match()
http://www.tipsntutorials.com/tutorials/PHP/50