Home >Backend Development >PHP Tutorial >搜索 忽略空格怎么写

搜索 忽略空格怎么写

WBOY
WBOYOriginal
2016-06-23 14:09:00966browse

MYSQL + PHP的


回复讨论(解决方案)

忽略空格?
你是打算忽略哪边的空格?搜索串还是目标串?
如果是搜素串,可以将搜索串按空格拆分,分段在目标串中查询
如果是目标串,那么就需要对搜索串做分词处理了

trim()

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn