AndrewBacca Posted January 20, 2010 Share Posted January 20, 2010 I have a templating system and I need/want to after the page has gone through the system remove un used "tags" an example is <loop:plists[].sublist> <ul> <li class="subcatlist"> <a href="<tag:plists[].sublist[].plink/>"><span><tag:plists[].sublist[].name/></span></a> </li> </ul> </loop:plists[].sublist> I want to be able to search for <loop:plists[].sublist> and remove everything after that until it finds the closing tag </loop:plists[].sublist> Baring in mind that "plists[].sublist" bit will change from page to page and I want to remove the tags aswell. I hope that all makes sence, thanks alot for any help you can give me Andrew Link to comment https://forums.phpfreaks.com/topic/189165-a-little-help-please/ Share on other sites More sharing options...
AndrewBacca Posted January 20, 2010 Author Share Posted January 20, 2010 solved it for referance if any ones needs it $expres = "{<loop[^>]*>(.*?)</loop[^>]*>}"; $this->output = preg_replace($expres, "", $this->output); Link to comment https://forums.phpfreaks.com/topic/189165-a-little-help-please/#findComment-998705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.