doubledee Posted December 23, 2011 Share Posted December 23, 2011 When I say something must be "alphanumeric", what do YOU define that as being? To me, it means ONLY Upper-Case Letters, Lower-Case Letters, and Numbers (i.e. A-Z, a-z, 0-9). Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253760-wha-is-alphanumeric/ Share on other sites More sharing options...
litebearer Posted December 23, 2011 Share Posted December 23, 2011 correct Quote Link to comment https://forums.phpfreaks.com/topic/253760-wha-is-alphanumeric/#findComment-1300892 Share on other sites More sharing options...
Pikachu2000 Posted December 23, 2011 Share Posted December 23, 2011 ctype_alnum: Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. Quote Link to comment https://forums.phpfreaks.com/topic/253760-wha-is-alphanumeric/#findComment-1300893 Share on other sites More sharing options...
doubledee Posted December 23, 2011 Author Share Posted December 23, 2011 ctype_alnum: Returns TRUE if every character in text is either a letter or a digit, FALSE otherwise. On a side note... Why would I want to use CType functions versus PREG? (I never even knew they existed?!) Debbie Quote Link to comment https://forums.phpfreaks.com/topic/253760-wha-is-alphanumeric/#findComment-1300897 Share on other sites More sharing options...
kicken Posted December 23, 2011 Share Posted December 23, 2011 Why would I want to use CType functions versus PREG? (I never even knew they existed?!) Regex is generally slower than functions that just deal with simple string operations. If what you want to do can be done with a few simple string functions then you should use them rather than involve the regex monster engine. Quote Link to comment https://forums.phpfreaks.com/topic/253760-wha-is-alphanumeric/#findComment-1300898 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.