Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个方法:
$message->from_address
在浏览器上显示时,显示为
<a href="some text">asdasd</a>
我只需要文本asdasd。我将如何将其分开,以便将 <a href="some text">and</a>部分分开。
asdasd
<a href="some text">
</a>
我想要这样,因为为了存储在一个变量中以便以后重用。我尝试通过将其>作为分隔符来分解它,但它只显示全文。我错过了什么?
>
<?php $str = '<a href="some text">asdasd</a>'; echo strip_tags($str);