Possible Duplicate:
Best methods to parse HTML with PHP

i wish to remove li class along with a tag within the list page in php, i've written the code in wordpress using wp_list_pages() to echo kids of a webpage, nevertheless its shows anchor tag within the list which i'm not going.

just how can do that?

Code:

<li class="page_item page-item-116">
     <a  href="">List One</a>
</li>

Expected result:

 <li>List One</li>

thanks ahead of time

   $texte = ' <li class="page_item page-item-116">
       <a  href="">List One</a>
    </li>';


$texte = preg_replace('#<li(.*)>(.+)</li>#iUs', '<li></li>', $texte);

this preg replace will return any empty <li> for just about any <li class="my class">eeeeee</li>

If you do not need it client side and get it done in php: http://www.php.net/manual/en/class.domdocument.php Otherwise you could utilize javascript client side and alter the innerHtml.