我要转换的是[table]这一类。
这一类在ubb那个中没有的。因为涉及到tr、td等的替换,还有个顺序问题。很麻烦。正则我用了不行。所以不得不再问

解决方案 »

  1.   

    用strtr()Examples: ---------------------------------------------------
    <?php
    $trans = array("hello" => "hi", "hi" => "hello");
    echo strtr("hi all, I said hello", $trans) . "\n";
    ?>
    ---------------------------------------------------This will show: "hello all, I said hi",
      

  2.   

    不能这样的。
    [table  xxx]你没法通过strtr直接替换成<table xxxx>的。只能通过正则匹配。