有谁知道去除一个文本中的所有空格,用PHP或者JAVASCRIPT。

同上
---------------------------------------------------------------

replace(string," ","")应该可以吧

trim()
---------------------------------------------------------------

JAVASCRIPT中用
string.replace(/ */g,"")
---------------------------------------------------------------

PHP函數 $str_result=trim(str_replace(" ","",$sourcestring));

Published At
Categories with Web编程
Tagged with
comments powered by Disqus