我要将程序源代码显示出来。
不知缩进的格式有什么好的处理方法。
1<pre>不好用。
2因为我的源码中要插入其他链接。
3\---------------------------------------------------------------
4
5用html的 替换空格
6\---------------------------------------------------------------
7
8只有做替换了,而且不很好换
9例:
$s = "asd<a href="xxxx.xxx">dsgsdf</a><br/> gsksdgsdlkgjlksgjfg";
$space = "&"."nbsp;";
$s = str_replace(" ",$space,$s);
while(($s1 = eregi_replace("(<[^<])".$space."([^<]>)","\\1 \\2",$s))!=$s)
$s = $s1;
$s = $s1;
echo $s;