如何將每個錨文本替換爲所有的錨點。我的代碼是 $body='<p>The man was <a href="http://www.example.com/video/">dancing like a little boy</a> while all kids were watching ... </p>';
我想要得到的結果是: <p>The man was dancing like a li
錯誤: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
代碼: function convert_url_to_bbcode($messagetext){
$skiptaglist = 'url|email|code|php|html|noparse';
return pre
我有一個文本字符串與HTML混合,需要分開的單詞只有幷包裹在跨度。 字符串: $string ='<div class="something">What </div> if it it is is same <div style="color:red;">same </div>';
所需的輸出 <div class="something">
<span class="splits s