• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 一個把字符串按php代碼高亮顯示的函數

    發表于:2007-07-14來源:作者:點擊數: 標簽:
    ///// by iwind.orgcoldwind/iwind/month/ccterran //這個函數是對[code][/code]標簽里的內容進行分析,并輸出 //例如: //? php $string='[code]?$hello=hello;?[/code]sssssssssssss'; //highlight($string); //? //保留了不完全的標簽,如只有[code],沒有[/c
    ///// by iwind.org  coldwind/iwind/month/clearcase/" target="_blank" >ccterran
    //這個函數是對[code][/code]標簽里的內容進行分析,并輸出
    //例如:
    //  <?php $string='[code]<?$hello="hello";?>[/code]sssssssssssss';
    //        highlight($string);
    //    ?>
    //保留了不完全的標簽,如只有[code],沒有[/code],則輸出中含有[code]
               
    function highlight($string){
       $arr=explode("[code]",$string);
       $total=sizeof($arr);
       for($i=0;$i<$total;$i++){
           if(ereg("(.+)\[/code\]",$arr[$i])){
             list($astr,$bstr)=split("\[/code\]",$arr[$i],"2");
             highlight_string($astr);
             echo"$bstr";
           }
    else{
         if($i!="0"){
            echo"[code]";
        }
         echo"$arr[$i]";
        }
    }
    }

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>