Remove div tags
Posted: Tue Apr 08, 2008 1:55 am
I need a php function that will remove all div tags except
Input example 1:
Output example 1:
Input example 2:
Example output 2:
Example input 3:
Output example 3:
Some text may contain other html tags except the div ones.
Thank you!
Code: Select all
<div align="left"><div align="center"><div align="right"><div align="justify">Code: Select all
<div align="right"><div class="class"><div align="right" class="class">some text</div></div></div>Code: Select all
<div align="right">some text</div>Code: Select all
<div align="right">some text</div></div></div></div>Code: Select all
<div align="right">some text</div>Code: Select all
<div align="right"><div align="right"><div align="right"><div align="right">some textCode: Select all
some textThank you!