php函数确定字符串是否仅包含字母数字字符? [英] Php function to determine if a string consist of only alphanumerical characters?

查看:149
本文介绍了php函数确定字符串是否仅包含字母数字字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有Php函数来确定字符串是否仅由ASCII字母数字字符组成?

Is there a Php function to determine if a string consist of only ASCII alphanumerical characters?

注意:很抱歉,这个问题听起来有些愚蠢,但是我很难在Php手册中找到这样的功能.

Note: I'm sorry if the question sounds dumb to some, but I couldn't easily find such a function in the Php manual.

推荐答案

尝试 ctype_alnum

这篇关于php函数确定字符串是否仅包含字母数字字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆