$str = str_replace("\\u", "&#x", $str);

解决方案 »

  1.   

    $str = str_replace("\u","\&#x",$str);
      

  2.   

    不对上面两位老大输出是:&#x6700&#x65B0&#x516C&#x544Aabc<br>对比一下:&#x6700;&#x65B0;&#x516C;&#x544A;abc<br>
      

  3.   

    <?php
    $s = "最新公告abc";$k = iconv("GB2312","JAVA",$s);
    echo $k."<br><br><br><br>";echo ereg_replace("[\x5c]u(.{4})","&#x\\1;",$k);?>
      

  4.   

    $str = str_replace("\\u",";&#x",$str);
    $str = substr($str,1);
    echo $str 
    看看行不行
      

  5.   

    string htmlentities(string text)
      

  6.   

    $str = htmlentities($s);echo $str;