PHP - 删除< span>从字符串标记 [英] PHP - Remove <span> tag from string
本文介绍了PHP - 删除< span>从字符串标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< div>
< span> 1< / span>
< a href =#> <跨度> 2< / span> < / A>
< a href =#> <跨度> 3< / span> < / A>
< a href =#> <跨度> 4< / span> < / A>
....
< / div>
如何移除< span>
标记(< a>
)?
解决方案
好像你正试图从当前页面中删除链接。如果是这样,你可能想看看这个教程。这可以通过3种方式完成。使用javascript,css或php和css。如果是这样,你可能想看看他的教程。
I have a string with this html:
<div>
<span> 1 </span>
<a href="#"> <span> 2 </span> </a>
<a href="#"> <span> 3 </span> </a>
<a href="#"> <span> 4 </span> </a>
....
</div>
how do I remove the <span>
tags from inside the links (<a>
) ?
解决方案
it seems like you are trying to remove the link from the current page. If so you might want to take a look at this tutorial. This can be accomplished 3 ways. Using javascript, css, or php and css. If so you may want to look at his tutorial.
这篇关于PHP - 删除< span>从字符串标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文