playwright Posted June 4, 2010 Share Posted June 4, 2010 I want to remove a div tag with all its content..so far i' m able to remove tags that don't contain any other tags inside..e.g <b>bla bla bla </b>..However the div tag i want to remove is like <div class="" style=""><tag>bla bla...<other tag/>....</tag></div>..any ideas?? Quote Link to comment Share on other sites More sharing options...
ignace Posted June 4, 2010 Share Posted June 4, 2010 post your code Quote Link to comment Share on other sites More sharing options...
playwright Posted June 4, 2010 Author Share Posted June 4, 2010 i just tried something like that preg_replace('/<div class\=[\"]quotation[\"] style=[\"][\"]\>(.*?)<\/div>/si',"", $html); and it works!! is there a better way to do that?? 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.