drupal_html_to_text() 转换成纯文本
drupal_html_to_text() 转换成纯文本的HTML字符串 , 保持结构的标记.使用时需要传递给drupal_html_to_text() 一个被转换的字符串参数.
例如:
<?php
$string = "<font size='20' color='red'>被转换的字符串</font>";
$newstring = drupal_html_to_text($string );
echo $newstring ;
?>
$newstring 就是转换后的字符串
- 添加新评论
- 346 次点击