Hướng dẫn php ctype_alnum allow spaces
Asked 8 years, 11 months ago Viewed 5k times I was trying to check if a string is alphanumeric using asked Nov 6, 2013 at 4:48
2 you could use
at the moment there is no function like that which you are looking for. answered Nov 6, 2013 at 5:07
tomexsanstomexsans 4,2644 gold badges31 silver badges47 bronze badges 1 (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8) ctype_alnum — Check for alphanumeric character(s) Descriptionctype_alnum(mixed Parameterstext The tested string.
Warning As of PHP 8.1.0, passing a non-string argument is deprecated. In the future, the argument will be interpreted as a string instead of an ASCII codepoint. Depending on the intended behavior, the argument should either be cast to string or an explicit call to chr() should be made.
Return Values Returns ExamplesExample #1 A ctype_alnum() example (using the default locale)
The above example will output: The string AbCd1zyZ9 consists of all letters or digits. The string foo!#$bar does not consist of all letters or digits. See Also
thinice at gmail dot com ¶ 13 years ago
ctype_alnum(str_replace($aValid, '', $sUser))) {
marcelocamargo at linuxmail dot org ¶ 6 years ago
Anonymous ¶ 9 years ago
Rory ¶ 12 years ago
|