共計 261 個字符,預計需要花費 1 分鐘才能閱讀完成。
在 php 中使用 strip_tags() 函數去除字符串中的注釋,具體方法如下:
strip_tags() 函數作用:
php 中 strip_tags() 函數的作用是用于剝除字符串中 HTML、XML 和 PHP 的標簽與注釋。
strip_tags() 函數語法:
strip_tags(string,allow)
參數:
string:指定字符串。
allow:需要保留的注釋或標簽。
strip_tags() 函數使用方法:
echo strip_tags("Hello world!","");
>>>Hello world!
丸趣 TV 網 – 提供最優質的資源集合!
正文完