两个换一个 不会没有的
以下是引用islet在2006-6-13 10:47:09的发言:
words=split(request(keywords)," ")
人家输入:手机 飞利浦
就不好了
这样改两个空格换成一个
key=replace(replace(replace(replace(replace(replace(replace(request(keywords)," "," ")," "," ")," "," ")," "," ")," "," ")," "," ")," "," ") '尽可能把多余的空格替换掉
words=split(key," ")
words=split(request(keywords)," ")
人家输入:手机 飞利浦
就不好了
这样改两个空格换成一个
key=replace(replace(replace(replace(replace(replace(replace(request(keywords)," "," ")," "," ")," "," ")," "," ")," "," ")," "," ")," "," ") '尽可能把多余的空格替换掉
words=split(key," ")
如果人家输入:手机 飞利浦(中间只有一个空格),那key就没有空格了,key="手机飞利浦",还怎么分割啊?!