Home >Backend Development >PHP Tutorial > php中化除用户输入的空格和标点符号

php中化除用户输入的空格和标点符号

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 12:43:09940browse

php中消除用户输入的空格和标点符号

  preg_replace("/[[:punct:]\s]/",'',$str)

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