如何去掉文章里的 html 语法 

  •   2009-07-31/22:59
  • <?
    $a="<font color=red>这是一个带HTML标识的字串</font>";
    $a=strip_tags($a);
    print $a;
    ?>


    2
    <?
    $a="<font color=red>这是一个带HTML标识的字串</font>";
    ereg_replace("^<.+>$", "", $a);
    print $a;
    ?>


    3 保留原有内容

    <?
    $a="<font color=red>这是一个带HTML标识的字串</font>";
    ereg_replace("<", "<", $a);
    ereg_replace(">", ">", $a);
    print $a;
    ?>

    评论 {{userinfo.comments}}

    {{money}}

    {{question.question}}

    A {{question.A}}
    B {{question.B}}
    C {{question.C}}
    D {{question.D}}
    提交

    驱动号 更多