-1
我想從我的msg字符串去掉html標籤。用strip_tags去掉多個標籤()
我有以下字符串包含用戶輸入:
$msg="<a href="#">Hello world</a> ! <b>Welcome to venga club</b> .<br><li>We are here to entertain you....</li>";
我知道這是簡單的正則表達式與和的preg_replace剝離這些標籤,但我想如果可能做到這一點使用用strip_tags()。
我嘗試下面的代碼
echo strip_tags("<a><b><li><br>",$msg);
但結果我得到的是黑色的,是有什麼問題的功能? 任何幫助都非常appriciated。
感謝
對於神的緣故閱讀說明書。 –